summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXInformation.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-12-17 17:04:15 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-12-17 17:04:15 (GMT)
commit9eb207aa89256f30947feb031717050aa5a16aae (patch)
tree20b8cd31619e69b109812d9930d09d0c6973a9f5 /Modules/CMakeCXXInformation.cmake
parent8506938407722306adeccf12b407a8e8d92a90a6 (diff)
downloadCMake-9eb207aa89256f30947feb031717050aa5a16aae.zip
CMake-9eb207aa89256f30947feb031717050aa5a16aae.tar.gz
CMake-9eb207aa89256f30947feb031717050aa5a16aae.tar.bz2
BUG: fix for bug 6167 get rid of extra space in flags
Diffstat (limited to 'Modules/CMakeCXXInformation.cmake')
-rw-r--r--Modules/CMakeCXXInformation.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index d4d1a8c..3d8460b 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -125,9 +125,12 @@ ENDFOREACH(type)
# on the initial values computed in the platform/*.cmake files
# use _INIT variables so that this only happens the first time
# and you can set these flags in the cmake cache
-SET (CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
+SET (CMAKE_CXX_FLAGS "$ENV{CXXFLAGS}" CACHE STRING
"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)
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING