summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenEx-LINK_LIBRARY
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-01-31 15:43:41 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-02-28 09:26:26 (GMT)
commit0a81ea1f12cbaf60ec60b8e4a27c5ea476a655de (patch)
tree8491b1ae05b5c252b1165244c6976d81c87397ee /Tests/RunCMake/GenEx-LINK_LIBRARY
parenta9928eb4a54431780d589f70460e5715258f1d27 (diff)
downloadCMake-0a81ea1f12cbaf60ec60b8e4a27c5ea476a655de.zip
CMake-0a81ea1f12cbaf60ec60b8e4a27c5ea476a655de.tar.gz
CMake-0a81ea1f12cbaf60ec60b8e4a27c5ea476a655de.tar.bz2
Genex-LINK_GROUP: Add possibility to group libraries at link step
Fixes: #23121
Diffstat (limited to 'Tests/RunCMake/GenEx-LINK_LIBRARY')
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature.cmake6
4 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake
index d5438b8..9c266fe 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake
@@ -9,6 +9,7 @@ run_cmake(target_link_directories)
run_cmake(no-arguments)
run_cmake(empty-arguments)
run_cmake(forbidden-arguments)
+run_cmake(invalid-feature)
run_cmake(bad-feature1)
run_cmake(bad-feature2)
run_cmake(bad-feature3)
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature-stderr.txt
new file mode 100644
index 0000000..fb5cdab
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at invalid-feature.cmake:[0-9]+ \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<LINK_LIBRARY:feat:invalid,dep>
+
+ The feature name 'feat:invalid' contains invalid characters.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature.cmake
new file mode 100644
index 0000000..c49e4cd
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/invalid-feature.cmake
@@ -0,0 +1,6 @@
+enable_language(C)
+
+add_library(dep SHARED empty.c)
+
+add_library(lib SHARED empty.c)
+target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feat:invalid,dep>")