summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-07 15:03:29 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-03-07 15:03:36 (GMT)
commit7e807479ffa2691d09eeae6e51322f34672dbef8 (patch)
tree32d9baa065a4bc72d8cb56ad4dcac0853893215e /Tests
parent5f7f9faada87134d60e63fb5d263d3c003889ffd (diff)
parentb0fada9964589462127cfcc45f1c6f003c349ebc (diff)
downloadCMake-7e807479ffa2691d09eeae6e51322f34672dbef8.zip
CMake-7e807479ffa2691d09eeae6e51322f34672dbef8.tar.gz
CMake-7e807479ffa2691d09eeae6e51322f34672dbef8.tar.bz2
Merge topic 'LINK_GROUP-rescan-static-libs'
b0fada9964 Genex-LINK_GROUP: Add feature RESCAN Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7044
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_GROUP/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_GROUP/cross_refs.cmake2
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_GROUP/rescan.cmake9
3 files changed, 18 insertions, 1 deletions
diff --git a/Tests/RunCMake/target_link_libraries-LINK_GROUP/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries-LINK_GROUP/RunCMakeTest.cmake
index eedc5b9..8307bb2 100644
--- a/Tests/RunCMake/target_link_libraries-LINK_GROUP/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_libraries-LINK_GROUP/RunCMakeTest.cmake
@@ -61,3 +61,11 @@ if ((RunCMake_GENERATOR MATCHES "Makefiles|Ninja|Xcode"
unset(RunCMake_TEST_OUTPUT_MERGE)
endif()
+
+# Feature RESCAN
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux"
+ OR (CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND (NOT CMAKE_C_COMPILER_ID STREQUAL "SunPro" OR CMAKE_C_COMPILER_VERSION VERSION_GREATER "5.9"))
+ OR (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "GNU"))
+ run_cmake(rescan)
+ run_cmake_target(rescan link main)
+endif()
diff --git a/Tests/RunCMake/target_link_libraries-LINK_GROUP/cross_refs.cmake b/Tests/RunCMake/target_link_libraries-LINK_GROUP/cross_refs.cmake
index 4a2a08c..f5f7857 100644
--- a/Tests/RunCMake/target_link_libraries-LINK_GROUP/cross_refs.cmake
+++ b/Tests/RunCMake/target_link_libraries-LINK_GROUP/cross_refs.cmake
@@ -1,7 +1,7 @@
enable_language(C)
- set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED TRUE)
+set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_C_LINK_GROUP_USING_cross_refs "LINKER:--start-group"
diff --git a/Tests/RunCMake/target_link_libraries-LINK_GROUP/rescan.cmake b/Tests/RunCMake/target_link_libraries-LINK_GROUP/rescan.cmake
new file mode 100644
index 0000000..810b892
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries-LINK_GROUP/rescan.cmake
@@ -0,0 +1,9 @@
+
+enable_language(C)
+
+# Feature RESCAN
+add_library(static1 STATIC func1.c func3.c)
+add_library(static2 STATIC func2.c)
+
+add_executable(main main.c)
+target_link_libraries(main PRIVATE "$<LINK_GROUP:RESCAN,static1,static2>")