diff options
author | Brad King <brad.king@kitware.com> | 2013-07-31 12:49:01 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-31 12:49:01 (GMT) |
commit | e3b6ab92dbb51945b81896f2d2a53f31ba63ae1a (patch) | |
tree | a2c2da204fb33dd71d624f7f88b3e22d48c30cc1 /Modules | |
parent | 58c5dc37d307c1d2a85c42e84e71cb619a6956b0 (diff) | |
parent | 33e6e0b9c2ae26c8d077e577ded49debb75d1070 (diff) | |
download | CMake-e3b6ab92dbb51945b81896f2d2a53f31ba63ae1a.zip CMake-e3b6ab92dbb51945b81896f2d2a53f31ba63ae1a.tar.gz CMake-e3b6ab92dbb51945b81896f2d2a53f31ba63ae1a.tar.bz2 |
Merge topic 'static_library_flags'
33e6e0b VS6: Add handling of CMAKE_*_LINKER_FLAGS_<CONFIG> variables
152dfda Add additonal tests for the linker flags
20ed496 Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables
54f7019 Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
2a43c30 Add support for CMAKE_STATIC_LINKER_FLAGS
14bbf83 Unify the way the flags of a static library are read
Diffstat (limited to 'Modules')
-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 ) |