CMake: fixed compiler settings inheritance
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Tue, 12 Mar 2013 08:17:55 +0000 (01:17 -0700)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Thu, 14 Mar 2013 12:03:40 +0000 (05:03 -0700)
test should not inherit the compiler setup from their related projects,
since unit tests with gtest/gmock will result in a lot of warnings,
if the related project uses strict compiler settings.

Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
cmake/modules/CustomMacros.txt

index d779238..69301f5 100644 (file)
@@ -26,7 +26,7 @@ ENDMACRO(add_subdirectory_once)
 
 MACRO(project_type mode)
     string(TOUPPER ${mode} mode_capital)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS_${mode_capital}}")
+    set(CMAKE_CXX_FLAGS "${COMPILER_FLAGS_${mode_capital}}")
     set(CMAKE_C_FLAGS   "${CMAKE_CXX_FLAGS}")
 
     if (mode_capital STREQUAL "PLUGIN" AND WITH_STATIC_LIBRARIES)