build: Allow to set CMAKE_CXX_FLAGS from outside 1_0_1
authorMichael Schuldt <michael.schuldt@bmw.de>
Wed, 10 Apr 2013 08:09:07 +0000 (10:09 +0200)
committerMichael Schuldt <michael.schuldt@bmw.de>
Wed, 10 Apr 2013 10:52:33 +0000 (12:52 +0200)
- due to the plugin refactoring, the CMAKE_CXX_FLAGS handling was changed too.
- currently it is not possible to set additional CMAKE_CXX_FLAGS from outside
- this patch fixes that issue

Signed-off-by: Michael Schuldt <michael.schuldt@bmw.de>
cmake/modules/CustomMacros.txt

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