summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-06-24 13:21:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-06-24 13:22:47 (GMT)
commitc3046ea2893dac12bef0b9fa23a1da26719cc2eb (patch)
tree1432fbe444a698604c3a4cb9e6ec318b9256e524
parentc43dc60c64c9bf2af00cc02946558fe0e29e0fed (diff)
parent576567f028f2366dda84fe3deb1d6cca62cb9890 (diff)
downloadCMake-c3046ea2893dac12bef0b9fa23a1da26719cc2eb.zip
CMake-c3046ea2893dac12bef0b9fa23a1da26719cc2eb.tar.gz
CMake-c3046ea2893dac12bef0b9fa23a1da26719cc2eb.tar.bz2
Merge topic 'link-feature-attributes-stabilization' into release-3.30
576567f028 Link feature attributes: stabilization 5617c34c31 Libraries processing: update configuration wording Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9607
-rw-r--r--Help/manual/cmake-variables.7.rst4
-rw-r--r--Help/release/3.30.rst6
-rw-r--r--Help/variable/CMAKE_LANG_LINK_LIBRARY_FEATURE_ATTRIBUTES.rst (renamed from Help/variable/CMAKE_LANG_LINK_LIBRARY_FEATURE_PROPERTIES.rst)6
-rw-r--r--Help/variable/CMAKE_LINK_LIBRARY_FEATURE_ATTRIBUTES.rst (renamed from Help/variable/CMAKE_LINK_LIBRARY_FEATURE_PROPERTIES.rst)37
-rw-r--r--Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt4
-rw-r--r--Modules/Platform/AIX-GNU.cmake2
-rw-r--r--Modules/Platform/AIX-XL.cmake2
-rw-r--r--Modules/Platform/Apple-Clang.cmake4
-rw-r--r--Modules/Platform/Apple-GNU.cmake2
-rw-r--r--Modules/Platform/CYGWIN-GNU.cmake2
-rw-r--r--Modules/Platform/Darwin.cmake16
-rw-r--r--Modules/Platform/FreeBSD.cmake2
-rw-r--r--Modules/Platform/Linux.cmake2
-rw-r--r--Modules/Platform/NetBSD.cmake2
-rw-r--r--Modules/Platform/SunOS.cmake2
-rw-r--r--Modules/Platform/Windows-Clang.cmake4
-rw-r--r--Modules/Platform/Windows-GNU.cmake2
-rw-r--r--Modules/Platform/Windows-IntelLLVM.cmake2
-rw-r--r--Modules/Platform/Windows-MSVC.cmake4
-rw-r--r--Source/cmComputeLinkDepends.cxx216
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake15
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-result.txt (renamed from Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1.cmake (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1.cmake)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2.cmake (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2.cmake)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3.cmake (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3.cmake)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4.cmake10
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5.cmake (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4.cmake)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5-stderr.txt4
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-stderr.txt6
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override.cmake14
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/multiple-override.cmake14
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type-stderr.txt6
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type.cmake (renamed from Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5.cmake)2
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake2
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake2
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake2
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt2
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake2
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-result.txt1
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-stderr.txt (renamed from Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-stderr.txt)4
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION.cmake (renamed from Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY.cmake)2
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake2
-rw-r--r--Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake2
58 files changed, 268 insertions, 191 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 6400a93..1abdd62 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -467,7 +467,7 @@ Variables that Control the Build
/variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE
/variable/CMAKE_LANG_LINK_GROUP_USING_FEATURE
/variable/CMAKE_LANG_LINK_GROUP_USING_FEATURE_SUPPORTED
- /variable/CMAKE_LANG_LINK_LIBRARY_FEATURE_PROPERTIES
+ /variable/CMAKE_LANG_LINK_LIBRARY_FEATURE_ATTRIBUTES
/variable/CMAKE_LANG_LINK_LIBRARY_FILE_FLAG
/variable/CMAKE_LANG_LINK_LIBRARY_FLAG
/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE
@@ -486,7 +486,7 @@ Variables that Control the Build
/variable/CMAKE_LINK_GROUP_USING_FEATURE
/variable/CMAKE_LINK_GROUP_USING_FEATURE_SUPPORTED
/variable/CMAKE_LINK_INTERFACE_LIBRARIES
- /variable/CMAKE_LINK_LIBRARY_FEATURE_PROPERTIES
+ /variable/CMAKE_LINK_LIBRARY_FEATURE_ATTRIBUTES
/variable/CMAKE_LINK_LIBRARY_FILE_FLAG
/variable/CMAKE_LINK_LIBRARY_FLAG
/variable/CMAKE_LINK_LIBRARY_USING_FEATURE
diff --git a/Help/release/3.30.rst b/Help/release/3.30.rst
index db66b0d..6d515fd 100644
--- a/Help/release/3.30.rst
+++ b/Help/release/3.30.rst
@@ -148,9 +148,9 @@ Generator Expressions
associated :variable:`CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT` variables.
* Link features, as used with the :genex:`LINK_LIBRARY` generator expression,
- gained the ability to have properties that describe their behavior by
- specifying the :variable:`CMAKE_LINK_LIBRARY_<FEATURE>_PROPERTIES` or
- :variable:`CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_PROPERTIES` variables.
+ gained the ability to have attributes that describe their behavior by
+ specifying the :variable:`CMAKE_LINK_LIBRARY_<FEATURE>_ATTRIBUTES` or
+ :variable:`CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_ATTRIBUTES` variables.
* The :genex:`QUOTE` generator expression was added to evaluate to ``"``.
diff --git a/Help/variable/CMAKE_LANG_LINK_LIBRARY_FEATURE_PROPERTIES.rst b/Help/variable/CMAKE_LANG_LINK_LIBRARY_FEATURE_ATTRIBUTES.rst
index 10f4fda..8769d60 100644
--- a/Help/variable/CMAKE_LANG_LINK_LIBRARY_FEATURE_PROPERTIES.rst
+++ b/Help/variable/CMAKE_LANG_LINK_LIBRARY_FEATURE_ATTRIBUTES.rst
@@ -1,10 +1,10 @@
-CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_PROPERTIES
+CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_ATTRIBUTES
----------------------------------------------
.. versionadded:: 3.30
This variable defines the semantics of the specified link library ``<FEATURE>``
when linking with the link language ``<LANG>``. It takes precedence over
-:variable:`CMAKE_LINK_LIBRARY_<FEATURE>_PROPERTIES` if that variable is also
+:variable:`CMAKE_LINK_LIBRARY_<FEATURE>_ATTRIBUTES` if that variable is also
defined for the same ``<FEATURE>``, but otherwise has similar effects.
-See :variable:`CMAKE_LINK_LIBRARY_<FEATURE>_PROPERTIES` for further details.
+See :variable:`CMAKE_LINK_LIBRARY_<FEATURE>_ATTRIBUTES` for further details.
diff --git a/Help/variable/CMAKE_LINK_LIBRARY_FEATURE_PROPERTIES.rst b/Help/variable/CMAKE_LINK_LIBRARY_FEATURE_ATTRIBUTES.rst
index e30c30a..c9966ff 100644
--- a/Help/variable/CMAKE_LINK_LIBRARY_FEATURE_PROPERTIES.rst
+++ b/Help/variable/CMAKE_LINK_LIBRARY_FEATURE_ATTRIBUTES.rst
@@ -1,4 +1,4 @@
-CMAKE_LINK_LIBRARY_<FEATURE>_PROPERTIES
+CMAKE_LINK_LIBRARY_<FEATURE>_ATTRIBUTES
---------------------------------------
.. versionadded:: 3.30
@@ -17,28 +17,29 @@ The :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` and
control whether the ``<FEATURE>`` is available at all.
When linking for a particular language ``<LANG>``,
-``CMAKE_LINK_LIBRARY_<FEATURE>_PROPERTIES`` is ignored if the
-:variable:`CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_PROPERTIES` variable is also
+``CMAKE_LINK_LIBRARY_<FEATURE>_ATTRIBUTES`` is ignored if the
+:variable:`CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_ATTRIBUTES` variable is also
defined for the same ``<FEATURE>``.
-The value of ``CMAKE_LINK_LIBRARY_<FEATURE>_PROPERTIES`` and
-:variable:`CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_PROPERTIES` at the end of the
+The value of ``CMAKE_LINK_LIBRARY_<FEATURE>_ATTRIBUTES`` and
+:variable:`CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_ATTRIBUTES` at the end of the
directory scope in which a target is defined is what matters.
-Feature Properties Definition
+Feature Attributes Definition
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-A feature properties definition is a
-:ref:`semicolon-separated list <CMake Language Lists>` of ``property=value(s)``
-items. If a property has multiple values, those values must be comma-separated.
+A feature attributes definition is a
+:ref:`semicolon-separated list <CMake Language Lists>` of
+``attribute=value(s)`` items. If an attribute has multiple values, those values
+must be comma-separated.
-The following properties are supported:
+The following attributes are supported:
``LIBRARY_TYPE=<library-type-list>``
Specify the library types supported by the feature. Supported values are:
``STATIC``, ``SHARED``, ``MODULE``, and ``EXECUTABLE``.
- If this property is not specified, the default is
+ If this attribute is not specified, the default is
``LIBRARY_TYPE=STATIC,SHARED,MODULE,EXECUTABLE``.
If the feature is used with an unsupported library type, CMake will emit a
@@ -51,9 +52,9 @@ The following properties are supported:
:prop_tgt:`LINK_LIBRARY_OVERRIDE_<LIBRARY>` target property definitions,
if defined.
- If this property is not specified, the default is an empty list.
+ If this attribute is not specified, the default is an empty list.
-``UNICITY=YES|NO|DEFAULT``
+``DEDUPLICATION=YES|NO|DEFAULT``
Specify the de-duplication strategy for a library using this feature.
``YES``
@@ -67,7 +68,7 @@ The following properties are supported:
``DEFAULT``
Let CMake determine a de-duplication strategy automatically.
- If this property is not specified, ``DEFAULT`` will be used.
+ If this attribute is not specified, ``DEFAULT`` will be used.
Example
^^^^^^^
@@ -75,14 +76,14 @@ Example
A common need is the loading of a full archive as part of the creation of a
shared library. The built-in ``WHOLE_ARCHIVE`` feature can be used for that
purpose. The implementation of that built-in feature sets the following
-link library feature properties:
+link library feature attributes:
.. code-block:: cmake
- set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES
+ set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES
LIBRARY_TYPE=STATIC
OVERRIDE=DEFAULT
- UNICITY=YES
+ DEDUPLICATION=YES
)
``LIBRARY_TYPE=STATIC``
@@ -92,7 +93,7 @@ link library feature properties:
because they are compatible and enhance the user's experience: standard
library specification and ``$<LINK_LIBRARY:WHOLE_ARCHIVE>`` can be used
freely.
-``UNICITY=YES``
+``DEDUPLICATION=YES``
When this feature is used, the linker loads all symbols from the static
library, so there is no need to repeat the library on the linker
command line.
diff --git a/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt
index 59a0d02..f5c19e0 100644
--- a/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt
+++ b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt
@@ -3,8 +3,8 @@ and underscores. Feature names defined in all uppercase are reserved for
CMake's own built-in features (see `Predefined Features`_ further below).
Some aspects of feature behavior can be defined by the
-:variable:`CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_PROPERTIES` and
-:variable:`CMAKE_LINK_LIBRARY_<FEATURE>_PROPERTIES` variables.
+:variable:`CMAKE_<LANG>_LINK_LIBRARY_<FEATURE>_ATTRIBUTES` and
+:variable:`CMAKE_LINK_LIBRARY_<FEATURE>_ATTRIBUTES` variables.
Feature Definitions
^^^^^^^^^^^^^^^^^^^
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake
index 55a6680..f6616fb 100644
--- a/Modules/Platform/AIX-GNU.cmake
+++ b/Modules/Platform/AIX-GNU.cmake
@@ -17,7 +17,7 @@ macro(__aix_compiler_gnu lang)
set(CMAKE_${lang}_VERBOSE_LINK_FLAG "-Wl,-v")
set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath")
- set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE UNICITY=ALL)
+ set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=ALL)
if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 7 OR CMAKE_SYSTEM_VERSION VERSION_LESS 7.1)
unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY)
diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake
index c225de9..cd202cb 100644
--- a/Modules/Platform/AIX-XL.cmake
+++ b/Modules/Platform/AIX-XL.cmake
@@ -17,7 +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(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=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 31f4293..40fed44 100644
--- a/Modules/Platform/Apple-Clang.cmake
+++ b/Modules/Platform/Apple-Clang.cmake
@@ -15,11 +15,11 @@ 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_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=ALL)
set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "-framework <LIBRARY>")
set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
- set(CMAKE_${lang}_LINK_LIBRARY_FRAMEWORK_PROPERTIES LIBRARY_TYPE=STATIC,SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+ set(CMAKE_${lang}_LINK_LIBRARY_FRAMEWORK_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
# linker selection
set(CMAKE_${lang}_USING_LINKER_SYSTEM "-fuse-ld=ld")
diff --git a/Modules/Platform/Apple-GNU.cmake b/Modules/Platform/Apple-GNU.cmake
index 20b18ad..bc4147e 100644
--- a/Modules/Platform/Apple-GNU.cmake
+++ b/Modules/Platform/Apple-GNU.cmake
@@ -17,7 +17,7 @@ macro(__apple_compiler_gnu lang)
set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "-framework <LIBRARY>")
set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
- set(CMAKE_LINK_LIBRARY_FRAMEWORK_PROPERTIES LIBRARY_TYPE=STATIC,SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+ set(CMAKE_LINK_LIBRARY_FRAMEWORK_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
set(CMAKE_${lang}_USING_LINKER_SYSTEM "")
set(CMAKE_${lang}_USING_LINKER_APPLE_CLASSIC "LINKER:-ld_classic")
diff --git a/Modules/Platform/CYGWIN-GNU.cmake b/Modules/Platform/CYGWIN-GNU.cmake
index 5e2ba41..01b5f91 100644
--- a/Modules/Platform/CYGWIN-GNU.cmake
+++ b/Modules/Platform/CYGWIN-GNU.cmake
@@ -40,7 +40,7 @@ else()
"LINKER:--no-whole-archive")
endif()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
macro(__cygwin_compiler_gnu lang)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 1272baf..b26912d 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -114,37 +114,37 @@ set(CMAKE_CREATE_TEXT_STUBS "<CMAKE_TAPI> stubify -isysroot <CMAKE_OSX_SYSROOT>
# Defines LINK_LIBRARY features for frameworks
set(CMAKE_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_FRAMEWORK_PROPERTIES LIBRARY_TYPE=STATIC,SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_FRAMEWORK_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
set(CMAKE_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_NEEDED_FRAMEWORK_PROPERTIES LIBRARY_TYPE=STATIC,SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_NEEDED_FRAMEWORK_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
set(CMAKE_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_REEXPORT_FRAMEWORK_PROPERTIES LIBRARY_TYPE=STATIC,SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_REEXPORT_FRAMEWORK_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
set(CMAKE_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WEAK_FRAMEWORK_PROPERTIES LIBRARY_TYPE=STATIC,SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WEAK_FRAMEWORK_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
# Defines LINK_LIBRARY features for libraries
set(CMAKE_LINK_LIBRARY_USING_NEEDED_LIBRARY "PATH{LINKER:-needed_library,<LIBRARY>}NAME{LINKER:-needed-l<LIBRARY>}")
set(CMAKE_LINK_LIBRARY_USING_NEEDED_LIBRARY_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_NEEDED_LIBRARY_PROPERTIES LIBRARY_TYPE=SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_NEEDED_LIBRARY_ATTRIBUTES LIBRARY_TYPE=SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
set(CMAKE_LINK_LIBRARY_USING_REEXPORT_LIBRARY "PATH{LINKER:-reexport_library,<LIBRARY>}NAME{LINKER:-reexport-l<LIBRARY>}")
set(CMAKE_LINK_LIBRARY_USING_REEXPORT_LIBRARY_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_REEXPORT_LIBRARY_PROPERTIES LIBRARY_TYPE=STATIC,SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_REEXPORT_LIBRARY_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
set(CMAKE_LINK_LIBRARY_USING_WEAK_LIBRARY "PATH{LINKER:-weak_library,<LIBRARY>}NAME{LINKER:-weak-l<LIBRARY>}")
set(CMAKE_LINK_LIBRARY_USING_WEAK_LIBRARY_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WEAK_LIBRARY_PROPERTIES LIBRARY_TYPE=STATIC,SHARED UNICITY=DEFAULT OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WEAK_LIBRARY_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
# Defines LINK_LIBRARY feature to Force loading of all members of an archive
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:-force_load,<LIB_ITEM>")
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
# default to searching for frameworks first
if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
diff --git a/Modules/Platform/FreeBSD.cmake b/Modules/Platform/FreeBSD.cmake
index 7d5f951..891422e 100644
--- a/Modules/Platform/FreeBSD.cmake
+++ b/Modules/Platform/FreeBSD.cmake
@@ -51,7 +51,7 @@ else()
"LINKER:--no-whole-archive")
endif()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
# Features for LINK_GROUP generator expression
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
index fba6ab8..b9801ee 100644
--- a/Modules/Platform/Linux.cmake
+++ b/Modules/Platform/Linux.cmake
@@ -44,7 +44,7 @@ else()
"LINKER:--no-whole-archive")
endif()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
# Features for LINK_GROUP generator expression
## RESCAN: request the linker to rescan static libraries until there is
diff --git a/Modules/Platform/NetBSD.cmake b/Modules/Platform/NetBSD.cmake
index af368cd..892d55b 100644
--- a/Modules/Platform/NetBSD.cmake
+++ b/Modules/Platform/NetBSD.cmake
@@ -37,7 +37,7 @@ else()
"LINKER:--no-whole-archive")
endif()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
# Features for LINK_GROUP generator expression
diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake
index 73205c1..25e95e6 100644
--- a/Modules/Platform/SunOS.cmake
+++ b/Modules/Platform/SunOS.cmake
@@ -20,7 +20,7 @@ else()
"LINKER:-z,defaultextract")
endif()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
# Features for LINK_GROUP generator expression
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake
index 35055bc..e3725cb 100644
--- a/Modules/Platform/Windows-Clang.cmake
+++ b/Modules/Platform/Windows-Clang.cmake
@@ -55,7 +55,7 @@ macro(__windows_compiler_clang_gnu lang)
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
- set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=FORWARD UNICITY=ALL)
+ set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=FORWARD DEDUPLICATION=ALL)
# linker selection
set(CMAKE_${lang}_USING_LINKER_DEFAULT "-fuse-ld=lld-link")
@@ -140,7 +140,7 @@ macro(__windows_compiler_clang_gnu lang)
## WHOLE_ARCHIVE: Force loading all members of an archive
set(CMAKE_${lang}_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:/WHOLEARCHIVE:<LIBRARY>")
set(CMAKE_${lang}_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
- set(CMAKE_${lang}_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+ set(CMAKE_${lang}_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
endif()
enable_language(RC)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index d2b25c6..1a4159b 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -88,7 +88,7 @@ else()
"LINKER:--no-whole-archive")
endif()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
# Features for LINK_GROUP generator expression
## RESCAN: request the linker to rescan static libraries until there is
diff --git a/Modules/Platform/Windows-IntelLLVM.cmake b/Modules/Platform/Windows-IntelLLVM.cmake
index 691c7ce..517d959 100644
--- a/Modules/Platform/Windows-IntelLLVM.cmake
+++ b/Modules/Platform/Windows-IntelLLVM.cmake
@@ -37,7 +37,7 @@ macro(__windows_compiler_intel lang)
## WHOLE_ARCHIVE: Force loading all members of an archive
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:/WHOLEARCHIVE:<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
- set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+ set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
endif()
set(CMAKE_${lang}_LINK_EXECUTABLE
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index c737b88..5809379 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -358,7 +358,7 @@ if(MSVC_VERSION GREATER "1900")
## WHOLE_ARCHIVE: Force loading all members of an archive
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "/WHOLEARCHIVE:<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
- set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_PROPERTIES LIBRARY_TYPE=STATIC UNICITY=YES OVERRIDE=DEFAULT)
+ set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
endif()
@@ -514,7 +514,7 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_DEPFILE_FORMAT msvc)
endif()
- set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=FORWARD UNICITY=ALL)
+ set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=FORWARD DEDUPLICATION=ALL)
# linker selection
set(CMAKE_${lang}_USING_LINKER_SYSTEM "${CMAKE_LINKER_LINK}")
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index cc323f4..1937674 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -202,8 +202,8 @@ bool IsFeatureSupported(cmMakefile* makefile, std::string const& linkLanguage,
return makefile->GetDefinition(featureSupported).IsOn();
}
-// LINK_LIBRARY feature properties management
-struct LinkLibraryFeaturePropertySet
+// LINK_LIBRARY feature attributes management
+struct LinkLibraryFeatureAttributeSet
{
std::set<cmStateEnums::TargetType> LibraryTypes = {
cmStateEnums::EXECUTABLE, cmStateEnums::STATIC_LIBRARY,
@@ -212,84 +212,88 @@ struct LinkLibraryFeaturePropertySet
};
std::set<std::string> Override;
- enum UnicityKind
+ enum DeduplicationKind
{
Default,
Yes,
No
};
- UnicityKind Unicity = Default;
+ DeduplicationKind Deduplication = Default;
};
-std::map<std::string, LinkLibraryFeaturePropertySet>
- LinkLibraryFeatureProperties;
-const LinkLibraryFeaturePropertySet& GetLinkLibraryFeatureProperties(
+std::map<std::string, LinkLibraryFeatureAttributeSet>
+ LinkLibraryFeatureAttributes;
+const LinkLibraryFeatureAttributeSet& GetLinkLibraryFeatureAttributes(
cmMakefile* makefile, std::string const& linkLanguage,
const std::string& feature)
{
- auto it = LinkLibraryFeatureProperties.find(feature);
- if (it != LinkLibraryFeatureProperties.end()) {
+ auto it = LinkLibraryFeatureAttributes.find(feature);
+ if (it != LinkLibraryFeatureAttributes.end()) {
return it->second;
}
- auto featurePropertiesVariable =
- cmStrCat("CMAKE_", linkLanguage, "_LINK_LIBRARY_", feature, "_PROPERTIES");
- auto featurePropertiesValues =
- makefile->GetDefinition(featurePropertiesVariable);
- if (featurePropertiesValues.IsEmpty()) {
+ auto featureAttributesVariable =
+ cmStrCat("CMAKE_", linkLanguage, "_LINK_LIBRARY_", feature, "_ATTRIBUTES");
+ auto featureAttributesValues =
+ makefile->GetDefinition(featureAttributesVariable);
+ if (featureAttributesValues.IsEmpty()) {
// try language agnostic definition
- featurePropertiesVariable =
- cmStrCat("CMAKE_LINK_LIBRARY_", feature, "_PROPERTIES");
- featurePropertiesValues =
- makefile->GetDefinition(featurePropertiesVariable);
+ featureAttributesVariable =
+ cmStrCat("CMAKE_LINK_LIBRARY_", feature, "_ATTRIBUTES");
+ featureAttributesValues =
+ makefile->GetDefinition(featureAttributesVariable);
}
- if (!featurePropertiesValues.IsEmpty()) {
- LinkLibraryFeaturePropertySet featureProperties;
+ if (!featureAttributesValues.IsEmpty()) {
+ LinkLibraryFeatureAttributeSet featureAttributes;
cmsys::RegularExpression processingOption{
- "^(LIBRARY_TYPE|UNICITY|OVERRIDE)=((STATIC|SHARED|MODULE|EXECUTABLE)(,("
+ "^(LIBRARY_TYPE|DEDUPLICATION|OVERRIDE)=((STATIC|SHARED|MODULE|"
+ "EXECUTABLE)(,("
"STATIC|"
"SHARED|MODULE|EXECUTABLE)"
")*|YES|NO|DEFAULT|[A-Za-z0-9_]+(,[A-Za-z0-9_]+)*)$"
};
std::string errorMessage;
- for (auto const& option : cmList{ featurePropertiesValues }) {
+ for (auto const& option : cmList{ featureAttributesValues }) {
if (processingOption.find(option)) {
if (processingOption.match(1) == "LIBRARY_TYPE") {
- featureProperties.LibraryTypes.clear();
+ featureAttributes.LibraryTypes.clear();
for (auto const& value :
cmTokenize(processingOption.match(2), ","_s)) {
if (value == "STATIC") {
- featureProperties.LibraryTypes.emplace(
+ featureAttributes.LibraryTypes.emplace(
cmStateEnums::STATIC_LIBRARY);
} else if (value == "SHARED") {
- featureProperties.LibraryTypes.emplace(
+ featureAttributes.LibraryTypes.emplace(
cmStateEnums::SHARED_LIBRARY);
} else if (value == "MODULE") {
- featureProperties.LibraryTypes.emplace(
+ featureAttributes.LibraryTypes.emplace(
cmStateEnums::MODULE_LIBRARY);
} else if (value == "EXECUTABLE") {
- featureProperties.LibraryTypes.emplace(cmStateEnums::EXECUTABLE);
+ featureAttributes.LibraryTypes.emplace(cmStateEnums::EXECUTABLE);
} else {
errorMessage += cmStrCat(" ", option, '\n');
break;
}
}
// Always add UNKNOWN type
- featureProperties.LibraryTypes.emplace(
+ featureAttributes.LibraryTypes.emplace(
cmStateEnums::UNKNOWN_LIBRARY);
- } else if (processingOption.match(1) == "UNICITY") {
+ } else if (processingOption.match(1) == "DEDUPLICATION") {
if (processingOption.match(2) == "YES") {
- featureProperties.Unicity = LinkLibraryFeaturePropertySet::Yes;
+ featureAttributes.Deduplication =
+ LinkLibraryFeatureAttributeSet::Yes;
} else if (processingOption.match(2) == "NO") {
- featureProperties.Unicity = LinkLibraryFeaturePropertySet::No;
+ featureAttributes.Deduplication =
+ LinkLibraryFeatureAttributeSet::No;
} else if (processingOption.match(2) == "DEFAULT") {
- featureProperties.Unicity = LinkLibraryFeaturePropertySet::Default;
+ featureAttributes.Deduplication =
+ LinkLibraryFeatureAttributeSet::Default;
} else {
errorMessage += cmStrCat(" ", option, '\n');
}
} else if (processingOption.match(1) == "OVERRIDE") {
- featureProperties.Override.clear();
+ featureAttributes.Override.clear();
auto values = cmTokenize(processingOption.match(2), ","_s);
- featureProperties.Override.insert(values.begin(), values.end());
+ featureAttributes.Override.insert(values.begin(), values.end());
}
} else {
errorMessage += cmStrCat(" ", option, '\n');
@@ -298,14 +302,14 @@ const LinkLibraryFeaturePropertySet& GetLinkLibraryFeatureProperties(
if (!errorMessage.empty()) {
makefile->GetCMakeInstance()->IssueMessage(
MessageType::FATAL_ERROR,
- cmStrCat("Erroneous option(s) for '", featurePropertiesVariable,
+ cmStrCat("Erroneous option(s) for '", featureAttributesVariable,
"':\n", errorMessage));
}
- return LinkLibraryFeatureProperties.emplace(feature, featureProperties)
+ return LinkLibraryFeatureAttributes.emplace(feature, featureAttributes)
.first->second;
}
- return LinkLibraryFeatureProperties
- .emplace(feature, LinkLibraryFeaturePropertySet{})
+ return LinkLibraryFeatureAttributes
+ .emplace(feature, LinkLibraryFeatureAttributeSet{})
.first->second;
}
@@ -376,8 +380,10 @@ public:
case cmPolicies::NEW: {
if (auto libProcessing = makefile->GetDefinition(cmStrCat(
"CMAKE_", linkLanguage, "_LINK_LIBRARIES_PROCESSING"))) {
+ // UNICITY keyword is just for compatibility with previous
+ // implementation
cmsys::RegularExpression processingOption{
- "^(ORDER|UNICITY)=(FORWARD|REVERSE|ALL|NONE|SHARED)$"
+ "^(ORDER|UNICITY|DEDUPLICATION)=(FORWARD|REVERSE|ALL|NONE|SHARED)$"
};
std::string errorMessage;
for (auto const& option : cmList{ libProcessing }) {
@@ -390,13 +396,14 @@ public:
} else {
errorMessage += cmStrCat(" ", option, '\n');
}
- } else if (processingOption.match(1) == "UNICITY") {
+ } else if (processingOption.match(1) == "UNICITY" ||
+ processingOption.match(1) == "DEDUPLICATION") {
if (processingOption.match(2) == "ALL") {
- this->Unicity = All;
+ this->Deduplication = All;
} else if (processingOption.match(2) == "NONE") {
- this->Unicity = None;
+ this->Deduplication = None;
} else if (processingOption.match(2) == "SHARED") {
- this->Unicity = Shared;
+ this->Deduplication = Shared;
} else {
errorMessage += cmStrCat(" ", option, '\n');
}
@@ -499,7 +506,7 @@ private:
Reverse
};
- enum UnicityKind
+ enum DeduplicationKind
{
None,
Shared,
@@ -509,22 +516,23 @@ private:
bool IncludeEntry(LinkEntry const& entry) const
{
if (entry.Feature != cmComputeLinkDepends::LinkEntry::DEFAULT) {
- auto const& featureProperties = GetLinkLibraryFeatureProperties(
+ auto const& featureAttributes = GetLinkLibraryFeatureAttributes(
this->Target->Makefile, this->LinkLanguage, entry.Feature);
if ((entry.Target == nullptr ||
- featureProperties.LibraryTypes.find(entry.Target->GetType()) !=
- featureProperties.LibraryTypes.end()) &&
- featureProperties.Unicity !=
- LinkLibraryFeaturePropertySet::Default) {
- return featureProperties.Unicity == LinkLibraryFeaturePropertySet::No;
+ featureAttributes.LibraryTypes.find(entry.Target->GetType()) !=
+ featureAttributes.LibraryTypes.end()) &&
+ featureAttributes.Deduplication !=
+ LinkLibraryFeatureAttributeSet::Default) {
+ return featureAttributes.Deduplication ==
+ LinkLibraryFeatureAttributeSet::No;
}
}
- return this->Unicity == None ||
- (this->Unicity == Shared &&
+ return this->Deduplication == None ||
+ (this->Deduplication == Shared &&
(entry.Target == nullptr ||
entry.Target->GetType() != cmStateEnums::SHARED_LIBRARY)) ||
- (this->Unicity == All && entry.Kind != LinkEntry::Library);
+ (this->Deduplication == All && entry.Kind != LinkEntry::Library);
}
template <typename Range>
@@ -539,7 +547,7 @@ private:
}
OrderKind Order = Reverse;
- UnicityKind Unicity = Shared;
+ DeduplicationKind Deduplication = Shared;
const cmGeneratorTarget* Target;
const std::string& LinkLanguage;
EntryVector& Entries;
@@ -1121,27 +1129,29 @@ void cmComputeLinkDepends::AddLinkEntries(size_t depender_index,
" library '", entry.Item.Value, "'."),
this->Target->GetBacktrace());
}
+ // check if feature is applicable to this item
+ if (itemFeature != LinkEntry::DEFAULT && entry.Target != nullptr) {
+ auto const& featureAttributes = GetLinkLibraryFeatureAttributes(
+ this->Makefile, this->LinkLanguage, itemFeature);
+ if (featureAttributes.LibraryTypes.find(entry.Target->GetType()) ==
+ featureAttributes.LibraryTypes.end()) {
+ supportedItem = false;
+ this->CMakeInstance->IssueMessage(
+ MessageType::AUTHOR_WARNING,
+ cmStrCat("The feature '", itemFeature,
+ "', specified as part of a generator-expression "
+ "'$<LINK_LIBRARY:",
+ itemFeature, ">', will not be applied to the ",
+ cmState::GetTargetTypeName(entry.Target->GetType()), " '",
+ entry.Item.Value, "'."),
+ this->Target->GetBacktrace());
+ }
+ }
if (ale.second) {
// current item not yet defined
entry.Feature = itemFeature;
-
- if (itemFeature != LinkEntry::DEFAULT && entry.Target != nullptr) {
- auto const& featureProperties = GetLinkLibraryFeatureProperties(
- this->Makefile, this->LinkLanguage, itemFeature);
- if (featureProperties.LibraryTypes.find(entry.Target->GetType()) ==
- featureProperties.LibraryTypes.end()) {
- supportedItem = false;
- entry.Feature = LinkEntry::DEFAULT;
- this->CMakeInstance->IssueMessage(
- MessageType::AUTHOR_WARNING,
- cmStrCat("The feature '", itemFeature,
- "', specified as part of a generator-expression "
- "'$<LINK_LIBRARY:",
- itemFeature, ">', will not be applied to the ",
- cmState::GetTargetTypeName(entry.Target->GetType()), " '",
- entry.Item.Value, "'."),
- this->Target->GetBacktrace());
- }
+ if (!supportedItem) {
+ entry.Feature = LinkEntry::DEFAULT;
}
}
@@ -1170,38 +1180,50 @@ void cmComputeLinkDepends::AddLinkEntries(size_t depender_index,
if (entry.Feature != itemFeature) {
bool incompatibleFeatures = true;
// check if an override is possible
- auto const& entryFeatureProperties = GetLinkLibraryFeatureProperties(
+ auto const& entryFeatureAttributes = GetLinkLibraryFeatureAttributes(
this->Makefile, this->LinkLanguage, entry.Feature);
- auto const& itemFeatureProperties = GetLinkLibraryFeatureProperties(
+ auto const& itemFeatureAttributes = GetLinkLibraryFeatureAttributes(
this->Makefile, this->LinkLanguage, itemFeature);
- if (entryFeatureProperties.Override.empty() &&
- !itemFeatureProperties.Override.empty() &&
- itemFeatureProperties.Override.find(entry.Feature) !=
- itemFeatureProperties.Override.end()) {
- entry.Feature = itemFeature;
- incompatibleFeatures = false;
- } else if (!entryFeatureProperties.Override.empty() &&
- itemFeatureProperties.Override.empty() &&
- entryFeatureProperties.Override.find(itemFeature) !=
- entryFeatureProperties.Override.end()) {
- incompatibleFeatures = false;
- }
- if (incompatibleFeatures) {
- // incompatibles features occurred
+ if (itemFeatureAttributes.Override.find(entry.Feature) !=
+ itemFeatureAttributes.Override.end() &&
+ entryFeatureAttributes.Override.find(itemFeature) !=
+ entryFeatureAttributes.Override.end()) {
+ // features override each other
this->CMakeInstance->IssueMessage(
MessageType::FATAL_ERROR,
cmStrCat("Impossible to link target '", this->Target->GetName(),
"' because the link item '", entry.Item.Value,
- "', specified ",
- (itemFeature == LinkEntry::DEFAULT
- ? "without any feature or 'DEFAULT' feature"
- : cmStrCat("with the feature '", itemFeature, '\'')),
- ", has already occurred ",
- (entry.Feature == LinkEntry::DEFAULT
- ? "without any feature or 'DEFAULT' feature"
- : cmStrCat("with the feature '", entry.Feature, '\'')),
- ", which is not allowed."),
+ "' is specified with the features '", itemFeature,
+ "' and '", entry.Feature, "'",
+ ", and both have an 'OVERRIDE' attribute that overrides "
+ "the other. Such cycles are not allowed."),
this->Target->GetBacktrace());
+ } else {
+ if (itemFeatureAttributes.Override.find(entry.Feature) !=
+ itemFeatureAttributes.Override.end()) {
+ entry.Feature = itemFeature;
+ incompatibleFeatures = false;
+ } else if (entryFeatureAttributes.Override.find(itemFeature) !=
+ entryFeatureAttributes.Override.end()) {
+ incompatibleFeatures = false;
+ }
+ if (incompatibleFeatures) {
+ // incompatibles features occurred
+ this->CMakeInstance->IssueMessage(
+ MessageType::FATAL_ERROR,
+ cmStrCat(
+ "Impossible to link target '", this->Target->GetName(),
+ "' because the link item '", entry.Item.Value, "', specified ",
+ (itemFeature == LinkEntry::DEFAULT
+ ? "without any feature or 'DEFAULT' feature"
+ : cmStrCat("with the feature '", itemFeature, '\'')),
+ ", has already occurred ",
+ (entry.Feature == LinkEntry::DEFAULT
+ ? "without any feature or 'DEFAULT' feature"
+ : cmStrCat("with the feature '", entry.Feature, '\'')),
+ ", which is not allowed."),
+ this->Target->GetBacktrace());
+ }
}
}
}
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake
index a061127..fdad38d 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake
@@ -36,9 +36,12 @@ run_cmake(override-features3)
run_cmake(override-features4)
run_cmake(override-features5)
-# testing feature properties specification
-run_cmake(bad-feature-properties1)
-run_cmake(bad-feature-properties2)
-run_cmake(bad-feature-properties3)
-run_cmake(bad-feature-properties4)
-run_cmake(bad-feature-properties5)
+# testing feature attributes specification
+run_cmake(bad-feature-attributes1)
+run_cmake(bad-feature-attributes2)
+run_cmake(bad-feature-attributes3)
+run_cmake(bad-feature-attributes4)
+run_cmake(bad-feature-attributes5)
+run_cmake(unsupported-library_type)
+run_cmake(cyclic-override)
+run_cmake(multiple-override)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-result.txt
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-result.txt
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-stderr.txt
new file mode 100644
index 0000000..5923654
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error:
+ Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES':
+
+ BAD_ATTRIBUTE=XXX
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1.cmake
index e5790a8..dc743a8 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1.cmake
@@ -2,7 +2,7 @@ enable_language(C)
set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_feature_PROPERTIES BAD_PROPERTY=XXX)
+set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES BAD_ATTRIBUTE=XXX)
add_library(dep SHARED empty.c)
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5-result.txt
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-result.txt
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-stderr.txt
new file mode 100644
index 0000000..5923654
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error:
+ Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES':
+
+ BAD_ATTRIBUTE=XXX
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2.cmake
index dea98d2..3012308 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2.cmake
@@ -2,7 +2,7 @@ enable_language(C)
set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_feature_PROPERTIES LIBRARY_TYPE=STATIC BAD_PROPERTY=XXX UNICITY=YES)
+set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES LIBRARY_TYPE=STATIC BAD_ATTRIBUTE=XXX DEDUPLICATION=YES)
add_library(dep SHARED empty.c)
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4-result.txt
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-result.txt
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-stderr.txt
new file mode 100644
index 0000000..a0b0a75
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error:
+ Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES':
+
+ LIBRARY_TYPE=STATIC,BAD_TYPE
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3.cmake
index 0a535db..8887934 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3.cmake
@@ -2,7 +2,7 @@ enable_language(C)
set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_feature_PROPERTIES LIBRARY_TYPE=STATIC,BAD_TYPE)
+set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES LIBRARY_TYPE=STATIC,BAD_TYPE)
add_library(dep SHARED empty.c)
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3-result.txt
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-result.txt
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-stderr.txt
new file mode 100644
index 0000000..a0b0a75
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error:
+ Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES':
+
+ LIBRARY_TYPE=STATIC,BAD_TYPE
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4.cmake
new file mode 100644
index 0000000..3edf268
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4.cmake
@@ -0,0 +1,10 @@
+enable_language(C)
+
+set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>")
+set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE)
+set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES DEDUPLICATION=YES LIBRARY_TYPE=STATIC,BAD_TYPE)
+
+add_library(dep SHARED empty.c)
+
+add_library(lib SHARED empty.c)
+target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature,dep>")
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2-result.txt
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-result.txt
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-stderr.txt
new file mode 100644
index 0000000..34c1143
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error:
+ Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES':
+
+ DEDUPLICATION=YES,NO
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5.cmake
index c106653..5af99cd 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5.cmake
@@ -2,7 +2,7 @@ enable_language(C)
set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_feature_PROPERTIES UNICITY=YES LIBRARY_TYPE=STATIC,BAD_TYPE)
+set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES DEDUPLICATION=YES,NO)
add_library(dep SHARED empty.c)
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1-stderr.txt
deleted file mode 100644
index ac07251..0000000
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CMake Error:
- Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_PROPERTIES':
-
- BAD_PROPERTY=XXX
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2-stderr.txt
deleted file mode 100644
index ac07251..0000000
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties2-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CMake Error:
- Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_PROPERTIES':
-
- BAD_PROPERTY=XXX
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3-stderr.txt
deleted file mode 100644
index 29f5f66..0000000
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties3-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CMake Error:
- Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_PROPERTIES':
-
- LIBRARY_TYPE=STATIC,BAD_TYPE
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4-stderr.txt
deleted file mode 100644
index 29f5f66..0000000
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties4-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CMake Error:
- Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_PROPERTIES':
-
- LIBRARY_TYPE=STATIC,BAD_TYPE
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5-stderr.txt
deleted file mode 100644
index 3e57782..0000000
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CMake Error:
- Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_PROPERTIES':
-
- UNICITY=YES,NO
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties1-result.txt
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-result.txt
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-stderr.txt
new file mode 100644
index 0000000..4476271
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at cyclic-override.cmake:[0-9]+ \(add_library\):
+ Impossible to link target 'lib' because the link item 'dep' is specified
+ with the features 'feature2' and 'feature1', and both have an 'OVERRIDE'
+ attribute that overrides the other. Such cycles are not allowed.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override.cmake
new file mode 100644
index 0000000..69b670b
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override.cmake
@@ -0,0 +1,14 @@
+enable_language(C)
+
+set(CMAKE_LINK_LIBRARY_USING_feature1 "<LIBRARY>")
+set(CMAKE_LINK_LIBRARY_USING_feature1_SUPPORTED TRUE)
+set(CMAKE_LINK_LIBRARY_feature1_ATTRIBUTES OVERRIDE=feature2)
+
+set(CMAKE_LINK_LIBRARY_USING_feature2 "<LIBRARY>")
+set(CMAKE_LINK_LIBRARY_USING_feature2_SUPPORTED TRUE)
+set(CMAKE_LINK_LIBRARY_feature2_ATTRIBUTES OVERRIDE=feature1)
+
+add_library(dep SHARED empty.c)
+
+add_library(lib SHARED empty.c)
+target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature1,dep>" "$<LINK_LIBRARY:feature2,dep>")
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake
index 675b87d..b5e52b5 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake
@@ -2,7 +2,7 @@ enable_language(C)
set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE)
set(CMAKE_C_LINK_LIBRARY_USING_feat "<LIBRARY>")
-set(CMAKE_C_LINK_LIBRARY_feat_PROPERTIES "LIBRARY_TYPE=STATIC")
+set(CMAKE_C_LINK_LIBRARY_feat_ATTRIBUTES "LIBRARY_TYPE=STATIC")
add_library(dep OBJECT empty.c)
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/multiple-override.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/multiple-override.cmake
new file mode 100644
index 0000000..97d85d0
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/multiple-override.cmake
@@ -0,0 +1,14 @@
+enable_language(C)
+
+set(CMAKE_LINK_LIBRARY_USING_feature1 "<LIBRARY>")
+set(CMAKE_LINK_LIBRARY_USING_feature1_SUPPORTED TRUE)
+set(CMAKE_LINK_LIBRARY_feature1_ATTRIBUTES OVERRIDE=feature2)
+
+set(CMAKE_LINK_LIBRARY_USING_feature2 "<LIBRARY>")
+set(CMAKE_LINK_LIBRARY_USING_feature2_SUPPORTED TRUE)
+set(CMAKE_LINK_LIBRARY_feature2_ATTRIBUTES OVERRIDE=feature3)
+
+add_library(dep SHARED empty.c)
+
+add_library(lib SHARED empty.c)
+target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature1,dep>" "$<LINK_LIBRARY:feature2,dep>")
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type-stderr.txt
new file mode 100644
index 0000000..a95648b
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type-stderr.txt
@@ -0,0 +1,6 @@
+CMake Warning \(dev\) at unsupported-library_type.cmake:[0-9]+ \(add_library\):
+ The feature 'feature', specified as part of a generator-expression
+ '\$<LINK_LIBRARY:feature>', will not be applied to the SHARED_LIBRARY 'dep'.
+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/GenEx-LINK_LIBRARY/bad-feature-properties5.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type.cmake
index 06efe7e..29aba56 100644
--- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-properties5.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type.cmake
@@ -2,7 +2,7 @@ enable_language(C)
set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>")
set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE)
-set(CMAKE_LINK_LIBRARY_feature_PROPERTIES UNICITY=YES,NO)
+set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES LIBRARY_TYPE=STATIC)
add_library(dep SHARED empty.c)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake
index e79eb45..ac5f7f1 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake
+++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake
@@ -1,7 +1,7 @@
enable_language(C)
-set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER= UNICITY=ALL)
+set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER= DEDUPLICATION=ALL)
add_library(lib STATIC lib.c)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake
index c9da734..63edfd3 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake
+++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake
@@ -1,7 +1,7 @@
enable_language(C)
-set(CMAKE_C_LINK_LIBRARIES_PROCESSING UNICITY=ALL ORDER)
+set(CMAKE_C_LINK_LIBRARIES_PROCESSING DEDUPLICATION=ALL ORDER)
add_library(lib STATIC lib.c)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake
index a1311fe..0bd7c5f 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake
+++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake
@@ -1,7 +1,7 @@
enable_language(C)
-set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE UNICITY=ALL)
+set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE DEDUPLICATION=ALL)
add_library(lib STATIC lib.c)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt
index 46d5513..256fd4e 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt
+++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt
@@ -2,7 +2,7 @@ CMake Error at InvalidConfiguration4.cmake:[0-9]+ \(add_executable\):
Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING':
WRONG=REVERSE
- UNICITY=WRONG
+ DEDUPLICATION=WRONG
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake
index 9d48f4f..ccb4dae 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake
+++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake
@@ -1,7 +1,7 @@
enable_language(C)
-set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE UNICITY=WRONG)
+set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE DEDUPLICATION=WRONG)
add_library(lib STATIC lib.c)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-result.txt b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-stderr.txt
index 4d759b7..1138a31 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-stderr.txt
+++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-stderr.txt
@@ -1,7 +1,7 @@
-CMake Error at Invalid_UNICITY.cmake:[0-9]+ \(add_executable\):
+CMake Error at Invalid_DEDUPLICATION.cmake:[0-9]+ \(add_executable\):
Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING':
- UNICITY=WRONG
+ DEDUPLICATION=WRONG
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY.cmake b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION.cmake
index f423eef..e5ff622 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY.cmake
+++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION.cmake
@@ -1,7 +1,7 @@
enable_language(C)
-set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=REVERSE UNICITY=WRONG)
+set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=WRONG)
add_library(lib STATIC lib.c)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake
index 72a7e02..f0c7ee3 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake
+++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake
@@ -1,7 +1,7 @@
enable_language(C)
-set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=WRONG UNICITY=ALL)
+set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=WRONG DEDUPLICATION=ALL)
add_library(lib STATIC lib.c)
diff --git a/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake b/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake
index 763f48b..d4105b4 100644
--- a/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake
+++ b/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake
@@ -1,7 +1,7 @@
include(RunCMake)
run_cmake(Invalid_ORDER)
-run_cmake(Invalid_UNICITY)
+run_cmake(Invalid_DEDUPLICATION)
run_cmake(InvalidConfiguration1)
run_cmake(InvalidConfiguration2)
run_cmake(InvalidConfiguration3)