|
@@ -145,13 +145,14 @@ ENDFOREACH(type)
|
|
|
# on the initial values computed in the platform/*.cmake files
|
|
# on the initial values computed in the platform/*.cmake files
|
|
|
# use _INIT variables so that this only happens the first time
|
|
# use _INIT variables so that this only happens the first time
|
|
|
# and you can set these flags in the cmake cache
|
|
# and you can set these flags in the cmake cache
|
|
|
-SET (CMAKE_CXX_FLAGS "$ENV{CXXFLAGS}" CACHE STRING
|
|
|
|
|
|
|
+SET(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
|
|
|
|
|
+# avoid just having a space as the initial value for the cache
|
|
|
|
|
+IF(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
|
|
|
|
|
+ SET(CMAKE_CXX_FLAGS_INIT)
|
|
|
|
|
+ENDIF(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
|
|
|
|
|
+SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
|
|
|
"Flags used by the compiler during all build types.")
|
|
"Flags used by the compiler during all build types.")
|
|
|
|
|
|
|
|
-IF (CMAKE_CXX_FLAGS_INIT)
|
|
|
|
|
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_INIT}")
|
|
|
|
|
-ENDIF (CMAKE_CXX_FLAGS_INIT)
|
|
|
|
|
-
|
|
|
|
|
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
|
|
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
|
|
|
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
|
|
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
|
|
|
"Flags used by the compiler during debug builds.")
|
|
"Flags used by the compiler during debug builds.")
|