diff options
Diffstat (limited to 'Tests/RunCMake')
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>") |