tbb/tbb-2021-Werror.patch
2024-01-17 19:27:10 +00:00

31 lines
1.8 KiB
Diff

diff -up oneTBB-2021.11.0/cmake/compilers/Clang.cmake.orig oneTBB-2021.11.0/cmake/compilers/Clang.cmake
--- oneTBB-2021.11.0/cmake/compilers/Clang.cmake.orig 2023-11-17 09:23:05.000000000 -0700
+++ oneTBB-2021.11.0/cmake/compilers/Clang.cmake 2023-12-28 20:35:24.422191660 -0700
@@ -46,11 +46,6 @@ endif()
set(TBB_WARNING_LEVEL -Wall -Wextra $<$<BOOL:${TBB_STRICT}>:-Werror>)
set(TBB_TEST_WARNING_FLAGS -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor)
-# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
-if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
- tbb_remove_compile_flag(-Werror)
-endif()
-
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)")
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>)
diff -up oneTBB-2021.11.0/cmake/compilers/GNU.cmake.orig oneTBB-2021.11.0/cmake/compilers/GNU.cmake
--- oneTBB-2021.11.0/cmake/compilers/GNU.cmake.orig 2023-11-17 09:23:05.000000000 -0700
+++ oneTBB-2021.11.0/cmake/compilers/GNU.cmake 2023-12-28 20:37:54.828060692 -0700
@@ -42,11 +42,6 @@ endif()
set(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS})
-# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
-if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
- tbb_remove_compile_flag(-Werror)
-endif()
-
if (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL Intel)
# gcc 6.0 and later have -flifetime-dse option that controls elimination of stores done outside the object lifetime
set(TBB_DSE_FLAG $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},6.0>>:-flifetime-dse=1>)