diff options
author | Patrick Gansterer <paroga@paroga.com> | 2013-07-11 08:18:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-07-31 12:41:07 (GMT) |
commit | 54f7019fd06d2aaabeb24f6f5b0379e574cb9fb8 (patch) | |
tree | 97705fef8e580ebf1b41ea59139316f0fbecf068 /Modules/CMakeCommonLanguageInclude.cmake | |
parent | 2a43c306fe434b87b087586c2e45d3e1fbe56d33 (diff) | |
download | CMake-54f7019fd06d2aaabeb24f6f5b0379e574cb9fb8.zip CMake-54f7019fd06d2aaabeb24f6f5b0379e574cb9fb8.tar.gz CMake-54f7019fd06d2aaabeb24f6f5b0379e574cb9fb8.tar.bz2 |
Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
Add support for CMAKE_STATIC_LINKER_FLAGS_* to
CMakeCommonLanguageInclude.cmake to set the defaults similar
to the other CMAKE_*_LINKER_FLAGS_*.
Diffstat (limited to 'Modules/CMakeCommonLanguageInclude.cmake')
-rw-r--r-- | Modules/CMakeCommonLanguageInclude.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake index bf94f9f..e945aa7 100644 --- a/Modules/CMakeCommonLanguageInclude.cmake +++ b/Modules/CMakeCommonLanguageInclude.cmake @@ -68,6 +68,19 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) ${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING "Flags used by the linker during Release with Debug Info builds.") + set (CMAKE_STATIC_LINKER_FLAGS_DEBUG ${CMAKE_STATIC_LINKER_FLAGS_DEBUG_INIT} CACHE STRING + "Flags used by the linker during debug builds.") + + set (CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL ${CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL_INIT} + CACHE STRING + "Flags used by the linker during release minsize builds.") + + set (CMAKE_STATIC_LINKER_FLAGS_RELEASE ${CMAKE_STATIC_LINKER_FLAGS_RELEASE_INIT} CACHE STRING + "Flags used by the linker during release builds.") + + set (CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO + ${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING + "Flags used by the linker during Release with Debug Info builds.") endif() # shared linker flags set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" @@ -77,6 +90,10 @@ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_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.") +# static linker flags +set (CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS_INIT}" + CACHE STRING "Flags used by the linker during the creation of static libraries.") + set(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL "What is the target build tool cmake is generating for.") @@ -103,5 +120,10 @@ CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO ) |