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>
This commit is contained in:
Brad King 2011-02-11 08:54:38 -05:00
parent 831c5ebe58
commit 3b77516862
1 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@
# cache values that can be initialized in the platform-compiler.cmake file # cache values that can be initialized in the platform-compiler.cmake file
# it may be included by more than one language. # 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.") 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) ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# shared linker 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.") CACHE STRING "Flags used by the linker during the creation of dll's.")
# module linker flags # 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.") CACHE STRING "Flags used by the linker during the creation of modules.")
SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL