summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-10-16 19:31:14 (GMT)
committerBrad King <brad.king@kitware.com>2024-10-16 20:49:27 (GMT)
commit262c27719767a3f5262dd9327d5f8c8ecf013e0e (patch)
tree4286249af8f71f012e5acc38f875e0a6bddd6205 /Tests
parent645b57b8cd9add9624f34e599070e65a98e10790 (diff)
downloadCMake-262c27719767a3f5262dd9327d5f8c8ecf013e0e.zip
CMake-262c27719767a3f5262dd9327d5f8c8ecf013e0e.tar.gz
CMake-262c27719767a3f5262dd9327d5f8c8ecf013e0e.tar.bz2
Revert "Ensure imported targets in sibling dirs are deduplicated"
Revert commit 502610733f (Ensure imported targets in sibling dirs are deduplicated, 2024-09-15, v3.31.0-rc1~92^2). Also revert the change from a copy of the logic made by commit cd418d4bb6 (Static libraries de-duplication: keep first occurrence, 2024-09-29, v3.31.0-rc1~30^2). The logic was de-duplicating based on the target name rather than based on the library file path. Fixes: #26371 Issue: #26284
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-result.txt1
-rw-r--r--Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-stdout.txt3
-rw-r--r--Tests/RunCMake/CMP0156/RunCMakeTest.cmake2
3 files changed, 5 insertions, 1 deletions
diff --git a/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-result.txt b/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-stdout.txt b/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-stdout.txt
new file mode 100644
index 0000000..c602967
--- /dev/null
+++ b/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-stdout.txt
@@ -0,0 +1,3 @@
+ld: warning: ignoring duplicate libraries: '[^']*liblib1\.a'
+ld: fatal warning\(s\) induced error \(-fatal_warnings\)
+(cc|clang): error: linker command failed with exit code 1 \(use -v to see invocation\)
diff --git a/Tests/RunCMake/CMP0156/RunCMakeTest.cmake b/Tests/RunCMake/CMP0156/RunCMakeTest.cmake
index 052547c..a58fc88 100644
--- a/Tests/RunCMake/CMP0156/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0156/RunCMakeTest.cmake
@@ -34,6 +34,6 @@ run_cmake_and_build(CMP0156-NEW-Imported)
if (CMAKE_C_COMPILER_ID STREQUAL "AppleClang"
AND CMAKE_C_COMPILER_VERSION GREATER_EQUAL "15.0")
- # special case for Apple: with CMP0156=OLD, linker will warning on duplicate libraries
+ # special case for Apple: FIXME(#26284): linker will warning on duplicate libraries
run_cmake_and_build(CMP0156-NEW-AppleClang-Imported)
endif()