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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-30 08:48:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-30 08:48:00 +0400
commitf708318833d736af62441105382786bab303ab14 (patch)
tree2652dc638650066bdb4a3643bcdd1e2e423f7fa3 /CMakeLists.txt
parentf837b46a2b561293660a0edf9d4de5ff16922f42 (diff)
correct flags for older GCC's which dont suppport -Wno-deprecated-declarations,
detect if the flag is supported before use
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fd5f3ef441..bcec149eda8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -302,6 +302,9 @@ set(PLATFORM_CFLAGS)
set(C_WARNINGS)
set(CXX_WARNINGS)
+# for gcc -Wno-blah-blah
+set(CC_REMOVE_STRICT_FLAGS)
+
# libraries to link the binary with passed to target_link_libraries()
# known as LLIBS to scons
set(PLATFORM_LINKLIBS "")
@@ -1250,6 +1253,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
# # this causes too many warnings, disable
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEFINED -Wundef)
+ # flags to undo strict flags
+ ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
+
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)