summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCommonLanguageInclude.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-02-11 13:54:38 (GMT)
committerBrad King <brad.king@kitware.com>2011-02-11 13:54:38 (GMT)
commit3b77516862e6e7991a5c6f16a0979dccfa439fce (patch)
tree1227858ffbe4284dcbe179240f40c55e39cfab39 /Modules/CMakeCommonLanguageInclude.cmake
parent831c5ebe581e4b5cc0dfb02c6f5e8ef4e955492f (diff)
downloadCMake-3b77516862e6e7991a5c6f16a0979dccfa439fce.zip
CMake-3b77516862e6e7991a5c6f16a0979dccfa439fce.tar.gz
CMake-3b77516862e6e7991a5c6f16a0979dccfa439fce.tar.bz2
Fix linker flag initialization from LDFLAGS (#11840)
When initializing CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS from LDFLAGS and CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS_INIT quote the whole string in case both are set. Reported-by: Daniel R. Gomez <gomez@teragram.com>
Diffstat (limited to 'Modules/CMakeCommonLanguageInclude.cmake')
-rw-r--r--Modules/CMakeCommonLanguageInclude.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake
index 237f8dd..a2929f1 100644
--- a/Modules/CMakeCommonLanguageInclude.cmake
+++ b/Modules/CMakeCommonLanguageInclude.cmake
@@ -16,7 +16,7 @@
# cache values that can be initialized in the platform-compiler.cmake file
# it may be included by more than one language.
-SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
+SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker.")
@@ -70,11 +70,11 @@ IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# shared linker flags
-SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
+SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker during the creation of dll's.")
# module linker flags
-SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
+SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker during the creation of modules.")
SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL