summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/target_link_libraries-LINK_LIBRARY
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-02-16 17:34:28 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-02-16 17:34:28 (GMT)
commit397ee55cd62dcfcbafb4ff62b189a4192e07d1e5 (patch)
tree47b3304aac407847d1afd338949e04358c4ed72f /Tests/RunCMake/target_link_libraries-LINK_LIBRARY
parent1e495fdab92b8ce5f2778c0cbc5e0ed55b056b98 (diff)
downloadCMake-397ee55cd62dcfcbafb4ff62b189a4192e07d1e5.zip
CMake-397ee55cd62dcfcbafb4ff62b189a4192e07d1e5.tar.gz
CMake-397ee55cd62dcfcbafb4ff62b189a4192e07d1e5.tar.bz2
genex-LINK_LIBRARY: rename configuration variables
To be more consistent between genex and variables as well as the forecomming LINK_GROUP genex, rename variable *_LINK_USING_<FEATURE>* in *_LINK_LIBRARY_USING_<FEATURE>*
Diffstat (limited to 'Tests/RunCMake/target_link_libraries-LINK_LIBRARY')
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake44
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt4
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_LIBRARY/weak_library.cmake6
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake20
4 files changed, 37 insertions, 37 deletions
diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake
index ced689e..1581611 100644
--- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake
+++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake
@@ -12,28 +12,28 @@ endif()
add_library(base1 SHARED base.c)
add_library(base2 SHARED base.c)
-set(CMAKE_C_LINK_USING_feat1 "--LIBFLAG<LIBRARY>")
-set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE)
+set(CMAKE_C_LINK_LIBRARY_USING_feat1 "--LIBFLAG<LIBRARY>")
+set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE)
-set(CMAKE_C_LINK_USING_feat1_1 "--LIBFLAG_C<LIBRARY>")
-set(CMAKE_C_LINK_USING_feat1_1_SUPPORTED FALSE)
-set(CMAKE_LINK_USING_feat1_1 "--LIBFLAG<LIBRARY>")
-set(CMAKE_LINK_USING_feat1_1_SUPPORTED TRUE)
+set(CMAKE_C_LINK_LIBRARY_USING_feat1_1 "--LIBFLAG_C<LIBRARY>")
+set(CMAKE_C_LINK_LIBRARY_USING_feat1_1_SUPPORTED FALSE)
+set(CMAKE_LINK_LIBRARY_USING_feat1_1 "--LIBFLAG<LIBRARY>")
+set(CMAKE_LINK_LIBRARY_USING_feat1_1_SUPPORTED TRUE)
-set(CMAKE_C_LINK_USING_feat2 "--PREFIXGROUP" "--LIBGROUP<LIBRARY>" "--SUFFIXGROUP")
-set(CMAKE_C_LINK_USING_feat2_SUPPORTED TRUE)
+set(CMAKE_C_LINK_LIBRARY_USING_feat2 "--PREFIXGROUP" "--LIBGROUP<LIBRARY>" "--SUFFIXGROUP")
+set(CMAKE_C_LINK_LIBRARY_USING_feat2_SUPPORTED TRUE)
-set(CMAKE_C_LINK_USING_feat3 "--PREFIXGROUP" "<LINK_ITEM>" "--SUFFIXGROUP")
-set(CMAKE_C_LINK_USING_feat3_SUPPORTED TRUE)
+set(CMAKE_C_LINK_LIBRARY_USING_feat3 "--PREFIXGROUP" "<LINK_ITEM>" "--SUFFIXGROUP")
+set(CMAKE_C_LINK_LIBRARY_USING_feat3_SUPPORTED TRUE)
-set(CMAKE_C_LINK_USING_feat4 "--PREFIXGROUP" "--LIBFLAG<LIBRARY> --ITEMFLAG<LIB_ITEM>" "--SUFFIXGROUP")
-set(CMAKE_C_LINK_USING_feat4_SUPPORTED TRUE)
+set(CMAKE_C_LINK_LIBRARY_USING_feat4 "--PREFIXGROUP" "--LIBFLAG<LIBRARY> --ITEMFLAG<LIB_ITEM>" "--SUFFIXGROUP")
+set(CMAKE_C_LINK_LIBRARY_USING_feat4_SUPPORTED TRUE)
-set(CMAKE_C_LINK_USING_feat5 "--PREFIXGROUP" "PATH{--LIBFLAG<LIBRARY>}NAME{--ITEMFLAG<LIB_ITEM>}" "--SUFFIXGROUP")
-set(CMAKE_C_LINK_USING_feat5_SUPPORTED TRUE)
+set(CMAKE_C_LINK_LIBRARY_USING_feat5 "--PREFIXGROUP" "PATH{--LIBFLAG<LIBRARY>}NAME{--ITEMFLAG<LIB_ITEM>}" "--SUFFIXGROUP")
+set(CMAKE_C_LINK_LIBRARY_USING_feat5_SUPPORTED TRUE)
-set(CMAKE_C_LINK_USING_feat6 "<LINK_ITEM>")
-set(CMAKE_C_LINK_USING_feat6_SUPPORTED TRUE)
+set(CMAKE_C_LINK_LIBRARY_USING_feat6 "<LINK_ITEM>")
+set(CMAKE_C_LINK_LIBRARY_USING_feat6_SUPPORTED TRUE)
add_library(LinkLibrary_simple1 SHARED lib.c)
@@ -77,28 +77,28 @@ target_link_libraries(LinkLibrary_mix_features2 PRIVATE "$<LINK_LIBRARY:feat2,ba
target_link_libraries(base3 INTERFACE other1)
add_library(LinkLibrary_mix_features3 SHARED lib.c)
-target_link_libraries(LinkLibrary_mix_features3 PRIVATE base2 $<LINK_LIBRARY:feat2,base1,base3> other2)
+target_link_libraries(LinkLibrary_mix_features3 PRIVATE base2 "$<LINK_LIBRARY:feat2,base1,base3>" other2)
# testing LINK_LIBRARY_OVERRIDE property
add_library(LinkLibrary_override_features1 SHARED lib.c)
-target_link_libraries(LinkLibrary_override_features1 PRIVATE $<LINK_LIBRARY:feat1,base1,base3>)
+target_link_libraries(LinkLibrary_override_features1 PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>")
set_property(TARGET LinkLibrary_override_features1 PROPERTY LINK_LIBRARY_OVERRIDE "feat1,base1")
add_library(LinkLibrary_override_features2 SHARED lib.c)
-target_link_libraries(LinkLibrary_override_features2 PRIVATE $<LINK_LIBRARY:feat1,base1,base3>)
+target_link_libraries(LinkLibrary_override_features2 PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>")
set_property(TARGET LinkLibrary_override_features2 PROPERTY LINK_LIBRARY_OVERRIDE "feat2,base1,other1")
add_library(LinkLibrary_override_with_default SHARED lib.c)
-target_link_libraries(LinkLibrary_override_with_default PRIVATE $<LINK_LIBRARY:feat1,base1,base3>)
+target_link_libraries(LinkLibrary_override_with_default PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>")
set_property(TARGET LinkLibrary_override_with_default PROPERTY LINK_LIBRARY_OVERRIDE "$<$<LINK_LANGUAGE:C>:DEFAULT,base1,other1>")
# testing LINK_LIBRARY_OVERRIDE_<LIBRARY> property
add_library(LinkLibrary_override_features3 SHARED lib.c)
-target_link_libraries(LinkLibrary_override_features3 PRIVATE $<LINK_LIBRARY:feat1,base1,base3>)
+target_link_libraries(LinkLibrary_override_features3 PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>")
set_property(TARGET LinkLibrary_override_features3 PROPERTY LINK_LIBRARY_OVERRIDE_base1 feat1)
add_library(LinkLibrary_override_features4 SHARED lib.c)
-target_link_libraries(LinkLibrary_override_features4 PRIVATE $<LINK_LIBRARY:feat1,base1,base3>)
+target_link_libraries(LinkLibrary_override_features4 PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>")
set_property(TARGET LinkLibrary_override_features4 PROPERTY LINK_LIBRARY_OVERRIDE "feat3,base1,other1")
set_property(TARGET LinkLibrary_override_features4 PROPERTY LINK_LIBRARY_OVERRIDE_base1 feat2)
set_property(TARGET LinkLibrary_override_features4 PROPERTY LINK_LIBRARY_OVERRIDE_other1 feat2)
diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt
index b3a86cc..981376a 100644
--- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt
+++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt
@@ -4,8 +4,8 @@ CMake Warning \(dev\) at imported-target.cmake:[0-9]+ \(add_library\):
unsupported.
Did you miss to define it by setting variables
- "CMAKE_C_LINK_USING_whole_archive" and
- "CMAKE_C_LINK_USING_whole_archive_SUPPORTED"\?
+ "CMAKE_C_LINK_LIBRARY_USING_whole_archive" and
+ "CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED"\?
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/weak_library.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/weak_library.cmake
index 135326e..45b4f66 100644
--- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/weak_library.cmake
+++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/weak_library.cmake
@@ -2,11 +2,11 @@
enable_language(C)
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
- set(CMAKE_LINK_USING_weak_library "PATH{-weak_library <LIBRARY>}NAME{LINKER:-weak-l<LIB_ITEM>}")
- set(CMAKE_LINK_USING_weak_library_SUPPORTED TRUE)
+ set(CMAKE_LINK_LIBRARY_USING_weak_library "PATH{-weak_library <LIBRARY>}NAME{LINKER:-weak-l<LIB_ITEM>}")
+ set(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED TRUE)
else()
# feature not yet supported for the other environments
- set(CMAKE_LINK_USING_whole_library_SUPPORTED FALSE)
+ set(CMAKE_LINK_LIBRARY_USING_whole_library_SUPPORTED FALSE)
endif()
add_library(lib SHARED base.c lib.c unref.c)
diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake
index 5214565..93082a4 100644
--- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake
+++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake
@@ -1,27 +1,27 @@
enable_language(C)
-set(CMAKE_C_LINK_USING_whole_archive_SUPPORTED TRUE)
+set(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
- set(CMAKE_C_LINK_USING_whole_archive "-force_load <LIB_ITEM>")
+ set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "-force_load <LIB_ITEM>")
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
execute_process(COMMAND "${CMAKE_LINKER}" --help
OUTPUT_VARIABLE linker_help
ERROR_VARIABLE linker_help)
if(linker_help MATCHES "--push-state" AND linker_help MATCHES "--pop-state")
- set(CMAKE_C_LINK_USING_whole_archive "LINKER:--push-state,--whole-archive"
- "<LINK_ITEM>"
- "LINKER:--pop-state")
+ set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "LINKER:--push-state,--whole-archive"
+ "<LINK_ITEM>"
+ "LINKER:--pop-state")
else()
- set(CMAKE_C_LINK_USING_whole_archive "LINKER:--whole-archive"
- "<LINK_ITEM>"
- "LINKER:--no-whole-archive")
+ set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "LINKER:--whole-archive"
+ "<LINK_ITEM>"
+ "LINKER:--no-whole-archive")
endif()
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
- set(CMAKE_C_LINK_USING_whole_archive "/WHOLEARCHIVE:<LIBRARY>")
+ set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "/WHOLEARCHIVE:<LIBRARY>")
else()
# feature not yet supported for the other environments
- set(CMAKE_C_LINK_USING_whole_archive_SUPPORTED FALSE)
+ set(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED FALSE)
endif()
add_library(base STATIC base.c unref.c)