summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeSystemSpecificInformation.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-11-19 23:17:17 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-11-19 23:17:17 (GMT)
commit5a75e03037b946abe56563fa1b568496f309ef5d (patch)
tree23f08815b01fea1e7216fac52a293ed347f73ad2 /Modules/CMakeSystemSpecificInformation.cmake
parent939035ad91aff5de5a1b514176cd2765a1b9a728 (diff)
downloadCMake-5a75e03037b946abe56563fa1b568496f309ef5d.zip
CMake-5a75e03037b946abe56563fa1b568496f309ef5d.tar.gz
CMake-5a75e03037b946abe56563fa1b568496f309ef5d.tar.bz2
allow flags to be in the CC and CXX environment variables
Diffstat (limited to 'Modules/CMakeSystemSpecificInformation.cmake')
-rw-r--r--Modules/CMakeSystemSpecificInformation.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake
index a6ef2e2..5b70da6 100644
--- a/Modules/CMakeSystemSpecificInformation.cmake
+++ b/Modules/CMakeSystemSpecificInformation.cmake
@@ -158,7 +158,7 @@ SET (CMAKE_INSTALL_PREFIX /usr/local CACHE PATH
# 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 "${CMAKE_CXX_FLAGS_ENV_INIT} $ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
@@ -168,7 +168,7 @@ SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
-SET (CMAKE_C_FLAGS " $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}" CACHE STRING
+SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_ENV_INIT} $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}" CACHE STRING
"Flags for C compiler.")
SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")