[Cmake-commits] CMake branch, next, updated. v2.8.10.1-812-g0b1cad0
Stephen Kelly
steveire at gmail.com
Wed Nov 7 11:02:50 EST 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 0b1cad094b3cc2e7144ff79fcf2302d1108c4efd (commit)
via 598f58c1aa1d6ff4e313442e006d14959c0169c5 (commit)
from 41b8134f584b4f953e48c8e422fbeb95c56df1e3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b1cad094b3cc2e7144ff79fcf2302d1108c4efd
commit 0b1cad094b3cc2e7144ff79fcf2302d1108c4efd
Merge: 41b8134 598f58c
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Nov 7 11:02:49 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Nov 7 11:02:49 2012 -0500
Merge topic 'compiler-warnings' into next
598f58c Don't duplicate the compiler flags if already set.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=598f58c1aa1d6ff4e313442e006d14959c0169c5
commit 598f58c1aa1d6ff4e313442e006d14959c0169c5
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Nov 7 17:01:52 2012 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Nov 7 17:01:52 2012 +0100
Don't duplicate the compiler flags if already set.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 532bb54..008abf8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -588,15 +588,26 @@ mark_as_advanced(CMAKE_STRICT)
if(NOT CMake_VERSION_IS_RELEASE)
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND
NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 4.2)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W -Wshadow")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpointer-arith -Wformat-security")
- if (NOT APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
- set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}")
- endif()
+ set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
+ -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
+ -Wmissing-format-attribute -fno-common
+ )
+ set(CXX_FLAGS_LIST -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W
+ -Wshadow -Wpointer-arith -Wformat-security
+ )
+
+ message("WTFFFFFFFFFF")
+ foreach(FLAG_LANG C CXX)
+ message("rrrrr ${FLAG_LANG}")
+ foreach(FLAG ${${FLAG_LANG}_FLAGS_LIST})
+ if(NOT " ${CMAKE_${FLAG_LANG}_FLAGS} " MATCHES " ${FLAG} ")
+ set(CMAKE_${FLAG_LANG}_FLAGS "${CMAKE_${FLAG_LANG}_FLAGS} ${FLAG}")
+ endif()
+ endforeach()
+ endforeach()
+
+ unset(C_FLAGS_LIST)
+ unset(CXX_FLAGS_LIST)
endif()
endif()
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list