summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-08-06 14:55:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-08-06 14:55:48 (GMT)
commit8e798c4ed892c284b837a8b41557dac67eeb9d5a (patch)
tree798bb62469a497bcb647839d5ae1dc3a275d79ca /Tests
parentc249cf8f60bce45683811c38bb9e66160ace0ef3 (diff)
parent87589fd96a467fb504df4f0323311202a8f4d108 (diff)
downloadCMake-8e798c4ed892c284b837a8b41557dac67eeb9d5a.zip
CMake-8e798c4ed892c284b837a8b41557dac67eeb9d5a.tar.gz
CMake-8e798c4ed892c284b837a8b41557dac67eeb9d5a.tar.bz2
Merge topic 'ninja-lwyu-ar'
87589fd96a Merge branch 'backport-ninja-lwyu-ar' into ninja-lwyu-ar 93eb4a7bd1 Ninja: Revert accidental LINK_WHAT_YOU_USE impl for static libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6418
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/C.cmake1
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/CXX.cmake1
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/foo.c4
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/foo.cxx4
4 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/LinkWhatYouUse/C.cmake b/Tests/RunCMake/LinkWhatYouUse/C.cmake
index 4c3f428..f00db30 100644
--- a/Tests/RunCMake/LinkWhatYouUse/C.cmake
+++ b/Tests/RunCMake/LinkWhatYouUse/C.cmake
@@ -2,3 +2,4 @@ enable_language(C)
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
add_executable(main main.c)
target_link_libraries(main m)
+add_library(foo STATIC foo.c)
diff --git a/Tests/RunCMake/LinkWhatYouUse/CXX.cmake b/Tests/RunCMake/LinkWhatYouUse/CXX.cmake
index 9555832..5762e94 100644
--- a/Tests/RunCMake/LinkWhatYouUse/CXX.cmake
+++ b/Tests/RunCMake/LinkWhatYouUse/CXX.cmake
@@ -2,3 +2,4 @@ enable_language(CXX)
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
add_executable(main main.cxx)
target_link_libraries(main m)
+add_library(foo STATIC foo.cxx)
diff --git a/Tests/RunCMake/LinkWhatYouUse/foo.c b/Tests/RunCMake/LinkWhatYouUse/foo.c
new file mode 100644
index 0000000..c83d856
--- /dev/null
+++ b/Tests/RunCMake/LinkWhatYouUse/foo.c
@@ -0,0 +1,4 @@
+int foo(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/LinkWhatYouUse/foo.cxx b/Tests/RunCMake/LinkWhatYouUse/foo.cxx
new file mode 100644
index 0000000..e05eb7e
--- /dev/null
+++ b/Tests/RunCMake/LinkWhatYouUse/foo.cxx
@@ -0,0 +1,4 @@
+int foo()
+{
+ return 0;
+}