Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-06-22 15:07:55 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-22 15:25:42 +0300
commit0d7e758c91eadead5cfb3a67da5b95ec6d07773c (patch)
treee1fb880e577489c3685beee3185f7769f0d9aefa /build_files
parenta5f046f44931a61272a065334438af86ddf9915c (diff)
CMake: Tweaks to removal of strict flags
Silences the following strict flags from external libraries: - -Wclass-memaccess - -Wswitch - -Wtype-limits - -Wint-in-bool-context Needed to tweak macro a bit, since the old logic was wrong: we can not use CXX flags for C compiler, need way more strict separation between what goes where.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 38e738522c6..1e6e4779224 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -1048,6 +1048,12 @@ macro(add_cc_flag
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
endmacro()
+macro(add_cxx_flag
+ flag)
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+endmacro()
+
macro(remove_strict_flags)
if(CMAKE_COMPILER_IS_GNUCC)
@@ -1071,6 +1077,7 @@ macro(remove_strict_flags)
# negate flags implied by '-Wall'
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
+ add_cxx_flag("${CXX_REMOVE_STRICT_FLAGS}")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -1083,6 +1090,7 @@ macro(remove_strict_flags)
# negate flags implied by '-Wall'
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
+ add_cxx_flag("${CXX_REMOVE_STRICT_FLAGS}")
endif()
if(MSVC)