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 /Tests | |
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 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 14 | ||||
-rw-r--r-- | Tests/LinkFlags/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/LinkFlags/LinkerFlags/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/LinkFlags/LinkerFlagsConfig/CMakeLists.txt | 11 |
4 files changed, 43 insertions, 2 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 440cdf0..16693de 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -394,10 +394,20 @@ if(BUILD_TESTING) endmacro() ADD_LINK_FLAGS_TEST(lib prepare) ADD_LINK_FLAGS_TEST(dll lib) - ADD_LINK_FLAGS_TEST(exe dll) + ADD_LINK_FLAGS_TEST(mod dll) + ADD_LINK_FLAGS_TEST(exe mod) ADD_LINK_FLAGS_TEST(lib_config exe) ADD_LINK_FLAGS_TEST(dll_config lib_config) - ADD_LINK_FLAGS_TEST(exe_config dll_config) + ADD_LINK_FLAGS_TEST(mod_config dll_config) + ADD_LINK_FLAGS_TEST(exe_config mod_config) + ADD_LINK_FLAGS_TEST(lib_flags exe_config) + ADD_LINK_FLAGS_TEST(dll_flags lib_flags) + ADD_LINK_FLAGS_TEST(mod_flags dll_flags) + ADD_LINK_FLAGS_TEST(exe_flags mod_flags) + ADD_LINK_FLAGS_TEST(lib_flags_config exe_flags) + ADD_LINK_FLAGS_TEST(dll_flags_config lib_flags_config) + ADD_LINK_FLAGS_TEST(mod_flags_config dll_flags_config) + ADD_LINK_FLAGS_TEST(exe_flags_config mod_flags_config) # If we are running right now with a UnixMakefiles based generator, # build the "Simple" test with the ExtraGenerators, if available diff --git a/Tests/LinkFlags/CMakeLists.txt b/Tests/LinkFlags/CMakeLists.txt index e06020c..4607035 100644 --- a/Tests/LinkFlags/CMakeLists.txt +++ b/Tests/LinkFlags/CMakeLists.txt @@ -13,6 +13,9 @@ set_property(TARGET LinkFlags_lib PROPERTY STATIC_LIBRARY_FLAGS ${pre}BADFLAG${o add_library(LinkFlags_dll SHARED LinkFlagsLib.c) set_property(TARGET LinkFlags_dll PROPERTY LINK_FLAGS ${pre}BADFLAG${obj}) +add_library(LinkFlags_mod MODULE LinkFlagsLib.c) +set_property(TARGET LinkFlags_mod PROPERTY LINK_FLAGS ${pre}BADFLAG${obj}) + add_executable(LinkFlags_exe LinkFlagsExe.c) set_property(TARGET LinkFlags_exe PROPERTY LINK_FLAGS ${pre}BADFLAG${obj}) @@ -22,7 +25,13 @@ set_property(TARGET LinkFlags_lib_config PROPERTY STATIC_LIBRARY_FLAGS_${TEST_CO add_library(LinkFlags_dll_config SHARED LinkFlagsLib.c) set_property(TARGET LinkFlags_dll_config PROPERTY LINK_FLAGS_${TEST_CONFIG_UPPER} ${pre}BADFLAG_${TEST_CONFIG}${obj}) +add_library(LinkFlags_mod_config MODULE LinkFlagsLib.c) +set_property(TARGET LinkFlags_mod_config PROPERTY LINK_FLAGS_${TEST_CONFIG_UPPER} ${pre}BADFLAG_${TEST_CONFIG}${obj}) + add_executable(LinkFlags_exe_config LinkFlagsExe.c) set_property(TARGET LinkFlags_exe_config PROPERTY LINK_FLAGS_${TEST_CONFIG_UPPER} ${pre}BADFLAG_${TEST_CONFIG}${obj}) add_executable(LinkFlags LinkFlags.c) + +add_subdirectory(LinkerFlags) +add_subdirectory(LinkerFlagsConfig) diff --git a/Tests/LinkFlags/LinkerFlags/CMakeLists.txt b/Tests/LinkFlags/LinkerFlags/CMakeLists.txt new file mode 100644 index 0000000..4707f47 --- /dev/null +++ b/Tests/LinkFlags/LinkerFlags/CMakeLists.txt @@ -0,0 +1,11 @@ +set(CMAKE_STATIC_LINKER_FLAGS ${pre}BADFLAG${obj}) +add_library(LinkFlags_lib_flags STATIC ../LinkFlagsLib.c) + +set(CMAKE_SHARED_LINKER_FLAGS ${pre}BADFLAG${obj}) +add_library(LinkFlags_dll_flags SHARED ../LinkFlagsLib.c) + +set(CMAKE_MODULE_LINKER_FLAGS ${pre}BADFLAG${obj}) +add_library(LinkFlags_mod_flags MODULE ../LinkFlagsLib.c) + +set(CMAKE_EXE_LINKER_FLAGS ${pre}BADFLAG${obj}) +add_executable(LinkFlags_exe_flags ../LinkFlagsExe.c) diff --git a/Tests/LinkFlags/LinkerFlagsConfig/CMakeLists.txt b/Tests/LinkFlags/LinkerFlagsConfig/CMakeLists.txt new file mode 100644 index 0000000..2854fe7 --- /dev/null +++ b/Tests/LinkFlags/LinkerFlagsConfig/CMakeLists.txt @@ -0,0 +1,11 @@ +set(CMAKE_STATIC_LINKER_FLAGS_${TEST_CONFIG_UPPER} ${pre}BADFLAG${obj}) +add_library(LinkFlags_lib_flags_config STATIC ../LinkFlagsLib.c) + +set(CMAKE_SHARED_LINKER_FLAGS_${TEST_CONFIG_UPPER} ${pre}BADFLAG${obj}) +add_library(LinkFlags_dll_flags_config SHARED ../LinkFlagsLib.c) + +set(CMAKE_MODULE_LINKER_FLAGS_${TEST_CONFIG_UPPER} ${pre}BADFLAG${obj}) +add_library(LinkFlags_mod_flags_config MODULE ../LinkFlagsLib.c) + +set(CMAKE_EXE_LINKER_FLAGS_${TEST_CONFIG_UPPER} ${pre}BADFLAG${obj}) +add_executable(LinkFlags_exe_flags_config ../LinkFlagsExe.c) |