summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-13 14:51:31 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-11-13 14:51:51 (GMT)
commitaf2fb376a41b47e19bf5effe1adad7bdc0ffd4e7 (patch)
treeb53c33bdba42bca73f8d536755cc1255e9d29385 /Modules
parent5bad0caea066cbea3698e4dcca16222215a2007f (diff)
parent7b99c42e57b11afe818827ac537ca020c020addd (diff)
downloadCMake-af2fb376a41b47e19bf5effe1adad7bdc0ffd4e7.zip
CMake-af2fb376a41b47e19bf5effe1adad7bdc0ffd4e7.tar.gz
CMake-af2fb376a41b47e19bf5effe1adad7bdc0ffd4e7.tar.bz2
Merge topic 'link-deduplicate-libs'
7b99c42e57 Link step: Enable to configure deduplication of libraries 07501c1678 Link Step: Introduce EntriesProcessing class Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !8946
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/AIX-GNU.cmake2
-rw-r--r--Modules/Platform/AIX-XL.cmake1
-rw-r--r--Modules/Platform/Apple-Clang.cmake2
-rw-r--r--Modules/Platform/Windows-Clang.cmake2
-rw-r--r--Modules/Platform/Windows-MSVC.cmake2
5 files changed, 9 insertions, 0 deletions
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake
index a9aa8e0..106eaec 100644
--- a/Modules/Platform/AIX-GNU.cmake
+++ b/Modules/Platform/AIX-GNU.cmake
@@ -16,6 +16,8 @@ macro(__aix_compiler_gnu lang)
set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1)
set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath")
+ set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE UNICITY=ALL)
+
if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 7 OR CMAKE_SYSTEM_VERSION VERSION_LESS 7.1)
unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY)
endif()
diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake
index 902cbb3..c225de9 100644
--- a/Modules/Platform/AIX-XL.cmake
+++ b/Modules/Platform/AIX-XL.cmake
@@ -17,6 +17,7 @@ macro(__aix_compiler_xl lang)
set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ")
set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath")
+ set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE UNICITY=ALL)
set(_OBJECTS " <OBJECTS>")
if(DEFINED CMAKE_XL_CreateExportList AND CMAKE_XL_CreateExportList STREQUAL "")
diff --git a/Modules/Platform/Apple-Clang.cmake b/Modules/Platform/Apple-Clang.cmake
index 5fe4300..7986a37 100644
--- a/Modules/Platform/Apple-Clang.cmake
+++ b/Modules/Platform/Apple-Clang.cmake
@@ -15,6 +15,8 @@ macro(__apple_compiler_clang lang)
set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ")
endif()
+ set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE UNICITY=ALL)
+
set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "-framework <LIBRARY>")
set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake
index a58c2d6..f081f42 100644
--- a/Modules/Platform/Windows-Clang.cmake
+++ b/Modules/Platform/Windows-Clang.cmake
@@ -54,6 +54,8 @@ macro(__windows_compiler_clang_gnu lang)
set(CMAKE_${lang}_LINK_OPTIONS_NO_PIE "")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "")
+ set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=FORWARD UNICITY=ALL)
+
# linker selection
set(CMAKE_${lang}_USING_LINKER_DEFAULT "-fuse-ld=lld-link")
set(CMAKE_${lang}_USING_LINKER_SYSTEM "-fuse-ld=link")
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 1fbf0cc..48e7c4e 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -513,6 +513,8 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_DEPFILE_FORMAT msvc)
endif()
+ set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=FORWARD UNICITY=ALL)
+
# linker selection
set(CMAKE_${lang}_USING_LINKER_SYSTEM "${CMAKE_LINKER_LINK}")
set(CMAKE_${lang}_USING_LINKER_LLD "${CMAKE_LINKER_LLD}")