summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-07-30 19:24:41 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-07-30 19:24:41 -0400
commit7a7b8933bbf15d1aeeb4a58895013fa73383ca2e (patch)
treeac29081066fb7adeebbd4017f0b7e762a54c417a /CMakeLists.txt
parenta68e215bad844568550afcb12f9516d054c61eb5 (diff)
Cleanup in modulemanager.cpp, make it so CMake only includes the -fno-leading-underscore flag on a GNU compiler, changed the hash compare functions to use struct to appease clang, and made it so hashcomp.h uses tr1/unordered_map with g++ 4.x or up.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 81be03bd3..64d533dcf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,11 +231,12 @@ if(MSVC)
else(MSVC)
# Set the compile flags to have all warnings on (including shadowed variables)
set(CXXFLAGS "${CXXFLAGS} -Wall -Wshadow")
- # If on a *nix system, also set the compile flags to remove GNU extensions (favor ISO C++) as well as reject non-ISO C++ code, also remove all leading underscores in exported symbols
+ # If on a *nix system, also set the compile flags to remove GNU extensions (favor ISO C++) as well as reject non-ISO C++ code, also remove all leading underscores in exported symbols (only on GNU compiler)
if(UNIX)
- set(CXXFLAGS "${CXXFLAGS} -ansi -pedantic -fno-leading-underscore")
- # Set the module-specific compile flags to the same setting as the compile flags
- set(MODULE_CXXFLAGS "${CXXFLAGS}")
+ set(CXXFLAGS "${CXXFLAGS} -ansi -pedantic")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set(CXXFLAGS "${CXXFLAGS} -fno-leading-underscore")
+ endif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# If we aren't on a *nix system, we are using MinGW
else(UNIX)
# Also, if we are building under MinGW, add another define for MinGW