diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2022-02-16 17:34:28 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-02-16 17:34:28 (GMT) |
commit | 397ee55cd62dcfcbafb4ff62b189a4192e07d1e5 (patch) | |
tree | 47b3304aac407847d1afd338949e04358c4ed72f | |
parent | 1e495fdab92b8ce5f2778c0cbc5e0ed55b056b98 (diff) | |
download | CMake-397ee55cd62dcfcbafb4ff62b189a4192e07d1e5.zip CMake-397ee55cd62dcfcbafb4ff62b189a4192e07d1e5.tar.gz CMake-397ee55cd62dcfcbafb4ff62b189a4192e07d1e5.tar.bz2 |
genex-LINK_LIBRARY: rename configuration variables
To be more consistent between genex and variables as well as
the forecomming LINK_GROUP genex, rename variable *_LINK_USING_<FEATURE>*
in *_LINK_LIBRARY_USING_<FEATURE>*
47 files changed, 216 insertions, 211 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 7c34671..0e9060d 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -1125,23 +1125,23 @@ Output-Related Expressions add_library(lib1 STATIC ...) add_library(lib2 ...) - target_link_libraries(lib2 PRIVATE $<LINK_LIBRARY:whole_archive,lib1>) + target_link_libraries(lib2 PRIVATE "$<LINK_LIBRARY:whole_archive,lib1>") This specify to use the ``lib1`` target with feature ``whole_archive`` for linking target ``lib2``. The feature must have be defined by - :variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>` variable or, if - :variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>_SUPPORTED` is false, - by :variable:`CMAKE_LINK_USING_<FEATURE>` variable. + :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>` variable or, if + :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` is false, + by :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>` variable. .. note:: The evaluation of this generator expression will use, for the following variables, the values defined at the level of the creation of the target: - * :variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>_SUPPORTED` - * :variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>` - * :variable:`CMAKE_LINK_USING_<FEATURE>_SUPPORTED` - * :variable:`CMAKE_LINK_USING_<FEATURE>` + * :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` + * :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>` + * :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` + * :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>` This expression can only be used to specify link libraries (i.e. part of :command:`link_libraries` or :command:`target_link_libraries` commands and @@ -1170,7 +1170,7 @@ Output-Related Expressions add_library(lib1 ...) add_library(lib2 ...) - target_link_libraries(lib2 PUBLIC $<LINK_LIBRARY:feature1,lib1>) + target_link_libraries(lib2 PUBLIC "$<LINK_LIBRARY:feature1,lib1>") add_library(lib3 ...) target_link_libraries(lib3 PRIVATE lib1 lib2) diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 5db622c..b38f56c 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -437,11 +437,11 @@ Variables that Control the Build /variable/CMAKE_LANG_CPPCHECK /variable/CMAKE_LANG_CPPLINT /variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE + /variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE + /variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE_SUPPORTED /variable/CMAKE_LANG_LINKER_LAUNCHER /variable/CMAKE_LANG_LINK_LIBRARY_FILE_FLAG /variable/CMAKE_LANG_LINK_LIBRARY_FLAG - /variable/CMAKE_LANG_LINK_USING_FEATURE - /variable/CMAKE_LANG_LINK_USING_FEATURE_SUPPORTED /variable/CMAKE_LANG_LINK_WHAT_YOU_USE_FLAG /variable/CMAKE_LANG_VISIBILITY_PRESET /variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY @@ -452,8 +452,8 @@ Variables that Control the Build /variable/CMAKE_LINK_INTERFACE_LIBRARIES /variable/CMAKE_LINK_LIBRARY_FILE_FLAG /variable/CMAKE_LINK_LIBRARY_FLAG - /variable/CMAKE_LINK_USING_FEATURE - /variable/CMAKE_LINK_USING_FEATURE_SUPPORTED + /variable/CMAKE_LINK_LIBRARY_USING_FEATURE + /variable/CMAKE_LINK_LIBRARY_USING_FEATURE_SUPPORTED /variable/CMAKE_LINK_WHAT_YOU_USE /variable/CMAKE_LINK_WHAT_YOU_USE_CHECK /variable/CMAKE_MACOSX_BUNDLE diff --git a/Help/prop_tgt/LINK_LIBRARY_OVERRIDE.rst b/Help/prop_tgt/LINK_LIBRARY_OVERRIDE.rst index e9c76b0..81a2a4a 100644 --- a/Help/prop_tgt/LINK_LIBRARY_OVERRIDE.rst +++ b/Help/prop_tgt/LINK_LIBRARY_OVERRIDE.rst @@ -22,10 +22,10 @@ example: .. code-block:: cmake add_library(lib1 ...) - target_link_libraries(lib1 PUBLIC $<LINK_LIBRARY:feature1,external>) + target_link_libraries(lib1 PUBLIC "$<LINK_LIBRARY:feature1,external>") add_library(lib2 ...) - target_link_libraries(lib2 PUBLIC $<LINK_LIBRARY:feature2,lib1>) + target_link_libraries(lib2 PUBLIC "$<LINK_LIBRARY:feature2,lib1>") add_library(lib3 ...) target_link_libraries(lib3 PRIVATE lib1 lib2) @@ -50,5 +50,5 @@ See also :prop_tgt:`LINK_LIBRARY_OVERRIDE_<LIBRARY>` target property for a per linked target oriented approach to override features. For more information about features, see -:variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>` -and :variable:`CMAKE_LINK_USING_<FEATURE>` variables. +:variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>` +and :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>` variables. diff --git a/Help/prop_tgt/LINK_LIBRARY_OVERRIDE_LIBRARY.rst b/Help/prop_tgt/LINK_LIBRARY_OVERRIDE_LIBRARY.rst index 58141c9..112f614 100644 --- a/Help/prop_tgt/LINK_LIBRARY_OVERRIDE_LIBRARY.rst +++ b/Help/prop_tgt/LINK_LIBRARY_OVERRIDE_LIBRARY.rst @@ -14,10 +14,10 @@ This property takes a ``feature`` name which will be applied to the .. code-block:: cmake add_library(lib1 ...) - target_link_libraries(lib1 PUBLIC $<LINK_LIBRARY:feature1,external>) + target_link_libraries(lib1 PUBLIC "$<LINK_LIBRARY:feature1,external>") add_library(lib2 ...) - target_link_libraries(lib2 PUBLIC $<LINK_LIBRARY:feature2,lib1>) + target_link_libraries(lib2 PUBLIC "$<LINK_LIBRARY:feature2,lib1>") add_library(lib3 ...) target_link_libraries(lib3 PRIVATE lib1 lib2) @@ -41,5 +41,5 @@ This property takes precedence over :prop_tgt:`LINK_LIBRARY_OVERRIDE` target property. For more information about features, see -:variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>` -and :variable:`CMAKE_LINK_USING_<FEATURE>` variables. +:variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>` +and :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>` variables. diff --git a/Help/release/dev/Genex-LINK_LIBRARY.rst b/Help/release/dev/Genex-LINK_LIBRARY.rst index 3234acb..fe44dbc 100644 --- a/Help/release/dev/Genex-LINK_LIBRARY.rst +++ b/Help/release/dev/Genex-LINK_LIBRARY.rst @@ -3,9 +3,9 @@ Genex-LINK_LIBRARY * The :genex:`LINK_LIBRARY` generator expression was added to manage how libraries are specified during the link step. The variables - :variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>` and - :variable:`CMAKE_LINK_USING_<FEATURE>` are used to define features usable by - the :genex:`LINK_LIBRARY` generator expression. Moreover, the + :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>` and + :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>` are used to define features + usable by the :genex:`LINK_LIBRARY` generator expression. Moreover, the :prop_tgt:`LINK_LIBRARY_OVERRIDE` and :prop_tgt:`LINK_LIBRARY_OVERRIDE_<LIBRARY>` target properties are available to resolve incompatible features. diff --git a/Help/variable/CMAKE_LANG_LINK_USING_FEATURE.rst b/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.rst index 9d7f87a..45b8aa8 100644 --- a/Help/variable/CMAKE_LANG_LINK_USING_FEATURE.rst +++ b/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.rst @@ -1,5 +1,5 @@ -CMAKE_<LANG>_LINK_USING_<FEATURE> ---------------------------------- +CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE> +----------------------------------------- .. versionadded:: 3.24 @@ -12,11 +12,11 @@ using :genex:`LINK_LIBRARY` generator expression. Feature names defined in all uppercase are reserved to CMake. See also the associated variable -:variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>_SUPPORTED` and -:variable:`CMAKE_LINK_USING_<FEATURE>` variable for the definition of features -independent from the link language. +:variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` and +:variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>` variable for the definition of +features independent from the link language. -.. include:: CMAKE_LINK_USING_FEATURE.txt +.. include:: CMAKE_LINK_LIBRARY_USING_FEATURE.txt Predefined Features ^^^^^^^^^^^^^^^^^^^ diff --git a/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE_SUPPORTED.rst b/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE_SUPPORTED.rst new file mode 100644 index 0000000..e595bc7 --- /dev/null +++ b/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE_SUPPORTED.rst @@ -0,0 +1,13 @@ +CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED +--------------------------------------------------- + +.. versionadded:: 3.24 + +Set to ``TRUE`` if the ``<FEATURE>``, as defined by variable +:variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>`, is supported for the +linker language ``<LANG>``. + +.. note:: + + This variable is evaluated before the more generic variable + :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED`. diff --git a/Help/variable/CMAKE_LANG_LINK_USING_FEATURE_SUPPORTED.rst b/Help/variable/CMAKE_LANG_LINK_USING_FEATURE_SUPPORTED.rst deleted file mode 100644 index 5794b15..0000000 --- a/Help/variable/CMAKE_LANG_LINK_USING_FEATURE_SUPPORTED.rst +++ /dev/null @@ -1,13 +0,0 @@ -CMAKE_<LANG>_LINK_USING_<FEATURE>_SUPPORTED -------------------------------------------- - -.. versionadded:: 3.24 - -Set to ``TRUE`` if the ``<FEATURE>``, as defined by variable -:variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>`, is supported for the linker -language ``<LANG>``. - -.. note:: - - This variable is evaluated before the more generic variable - :variable:`CMAKE_LINK_USING_<FEATURE>_SUPPORTED`. diff --git a/Help/variable/CMAKE_LINK_USING_FEATURE.rst b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.rst index 0c9cadc..eae60c5 100644 --- a/Help/variable/CMAKE_LINK_USING_FEATURE.rst +++ b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.rst @@ -1,5 +1,5 @@ -CMAKE_LINK_USING_<FEATURE> --------------------------- +CMAKE_LINK_LIBRARY_USING_<FEATURE> +---------------------------------- .. versionadded:: 3.24 @@ -12,15 +12,16 @@ using :genex:`LINK_LIBRARY` generator expression. Feature names defined in all uppercase are reserved to CMake. See also the associated variable -:variable:`CMAKE_LINK_USING_<FEATURE>_SUPPORTED` and -:variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>` variable for the definition of -features dependent from the link language. +:variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` and +:variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>` variable for the +definition of features dependent from the link language. This variable will be used by :genex:`LINK_LIBRARY` generator expression if, for the linker language, the variable -:variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>_SUPPORTED` is false or not set. +:variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` is false or not +set. -.. include:: CMAKE_LINK_USING_FEATURE.txt +.. include:: CMAKE_LINK_LIBRARY_USING_FEATURE.txt Predefined Features ^^^^^^^^^^^^^^^^^^^ diff --git a/Help/variable/CMAKE_LINK_USING_FEATURE.txt b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt index 92fc92d..ad393b0 100644 --- a/Help/variable/CMAKE_LINK_USING_FEATURE.txt +++ b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt @@ -46,27 +46,27 @@ is offered by various environments but with a specific syntax: .. code-block:: cmake - set(CMAKE_C_LINK_USING_whole_archive_SUPPORTED TRUE) + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED TRUE) if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang") - set(CMAKE_C_LINK_USING_whole_archive "-force_load <LIB_ITEM>") + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "-force_load <LIB_ITEM>") elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(CMAKE_C_LINK_USING_whole_archive "LINKER:--push-state,--whole-archive" - "<LINK_ITEM>" - "LINKER:--pop-state") + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "LINKER:--push-state,--whole-archive" + "<LINK_ITEM>" + "LINKER:--pop-state") elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_C_LINK_USING_whole_archive "/WHOLEARCHIVE:<LIBRARY>") + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "/WHOLEARCHIVE:<LIBRARY>") else() # feature not yet supported for the other environments - set(CMAKE_C_LINK_USING_whole_archive_SUPPORTED FALSE) + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED FALSE) endif() add_library(lib1 STATIC ...) add_library(lib2 SHARED ...) - if(CMAKE_C_LINK_USING_whole_archive_SUPPORTED) + if(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED) target_link_libraries(lib2 PRIVATE - $<LINK_LIBRARY:whole_archive,lib1,$<IF:$<LINK_LANG_AND_ID:C,Clang>,libexternal.a,external>>) + "$<LINK_LIBRARY:whole_archive,lib1,$<IF:$<LINK_LANG_AND_ID:C,Clang>,libexternal.a,external>>") else() target_link_libraries(lib2 PRIVATE lib1 external) endif() @@ -95,14 +95,15 @@ library specified by path and by name. This constraint by be solved by using .. code-block:: cmake if (CMAKE_C_COMPILER_ID STREQUAL "AppleClang") - set(CMAKE_LINK_USING_weak_library "PATH{-weak_library <LIBRARY>}NAME{LINKER:-weak-l<LIB_ITEM>}") - set(CMAKE_LINK_USING_weak_library_SUPPORTED TRUE) + set(CMAKE_LINK_LIBRARY_USING_weak_library + "PATH{-weak_library <LIBRARY>}NAME{LINKER:-weak-l<LIB_ITEM>}") + set(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED TRUE) endif() add_library(lib SHARED ...) add_executable(main ...) - if(CMAKE_LINK_USING_weak_library_SUPPORTED) - target_link_libraries(main PRIVATE $<LINK_LIBRARY:weak_library,lib,external>) + if(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED) + target_link_libraries(main PRIVATE "$<LINK_LIBRARY:weak_library,lib,external>") else() target_link_libraries(main PRIVATE lib external) endif() diff --git a/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE_SUPPORTED.rst b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE_SUPPORTED.rst new file mode 100644 index 0000000..42b75fc --- /dev/null +++ b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE_SUPPORTED.rst @@ -0,0 +1,14 @@ +CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED +-------------------------------------------- + +.. versionadded:: 3.24 + +Set to ``TRUE`` if the ``<FEATURE>``, as defined by variable +:variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>`, is supported regardless the +linker language. + +.. note:: + + This variable is evaluated if, and only if, the variable + :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` evaluates to + ``FALSE``. diff --git a/Help/variable/CMAKE_LINK_USING_FEATURE_SUPPORTED.rst b/Help/variable/CMAKE_LINK_USING_FEATURE_SUPPORTED.rst deleted file mode 100644 index 31c3108..0000000 --- a/Help/variable/CMAKE_LINK_USING_FEATURE_SUPPORTED.rst +++ /dev/null @@ -1,14 +0,0 @@ -CMAKE_LINK_USING_<FEATURE>_SUPPORTED ------------------------------------- - -.. versionadded:: 3.24 - -Set to ``TRUE`` if the ``<FEATURE>``, as defined by variable -:variable:`CMAKE_LINK_USING_<FEATURE>`, is supported regardless the linker -language. - -.. note:: - - This variable is evaluated if, and only if, the variable - :variable:`CMAKE_<LANG>_LINK_USING_<FEATURE>_SUPPORTED` evaluates to - ``FALSE``. diff --git a/Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt b/Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt index d4fdf76..82c406a 100644 --- a/Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt +++ b/Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt @@ -23,9 +23,11 @@ compatible with it. linker option ``-weak_framework``). Features for framework linking have a special handling in ``CMake``: the -framework can be specified as a ``CMake`` framework target or file path. In -the later case, if the path includes a directory part, this one will be -specified as framework search path at link step. +framework can be specified as a ``CMake`` framework target or file path. In the +first case, the target must have the :prop_tgt:`FRAMEWORK` target property set +as ``TRUE`` to enable framework handling. In the later case, if the path +includes a directory part, this one will be specified as framework search path +at link step. .. code-block:: cmake diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake index 9ae68c4..6e75fac 100644 --- a/Modules/CMakeGenericSystem.cmake +++ b/Modules/CMakeGenericSystem.cmake @@ -28,7 +28,7 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a") # default option to link a library # This feature is intended to be used in LINK_LIBRARY_OVERRIDE and # LINK_LIBRARY_OVERRIDE_<LIBRARY> target properties -set(CMAKE_LINK_USING_DEFAULT_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_USING_DEFAULT_SUPPORTED TRUE) set(CMAKE_AUTOGEN_ORIGIN_DEPENDS ON) set(CMAKE_AUTOMOC_COMPILER_PREDEFINES ON) diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake index 44eb35f..e85ec67 100644 --- a/Modules/Compiler/Clang-CUDA.cmake +++ b/Modules/Compiler/Clang-CUDA.cmake @@ -41,15 +41,15 @@ endif() if(APPLE) # Defines host link features for frameworks - set(CMAKE_CUDA_LINK_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") - set(CMAKE_CUDA_LINK_USING_FRAMEWORK_SUPPORTED TRUE) + set(CMAKE_CUDA_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") + set(CMAKE_CUDA_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE) - set(CMAKE_CUDA_LINK_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") - set(CMAKE_CUDA_LINK_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE) + set(CMAKE_CUDA_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") + set(CMAKE_CUDA_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE) - set(CMAKE_CUDA_LINK_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") - set(CMAKE_CUDA_LINK_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE) + set(CMAKE_CUDA_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") + set(CMAKE_CUDA_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE) - set(CMAKE_CUDA_LINK_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") - set(CMAKE_CUDA_LINK_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) + set(CMAKE_CUDA_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") + set(CMAKE_CUDA_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) endif() diff --git a/Modules/Platform/Apple-Apple-Swift.cmake b/Modules/Platform/Apple-Apple-Swift.cmake index 255411e..9f604e8 100644 --- a/Modules/Platform/Apple-Apple-Swift.cmake +++ b/Modules/Platform/Apple-Apple-Swift.cmake @@ -2,14 +2,14 @@ set(CMAKE_Swift_SYSROOT_FLAG "-sdk") # Defines host link features for frameworks -set(CMAKE_Swift_LINK_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") -set(CMAKE_Swift_LINK_USING_FRAMEWORK_SUPPORTED TRUE) +set(CMAKE_Swift_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") +set(CMAKE_Swift_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE) -set(CMAKE_Swift_LINK_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") -set(CMAKE_Swift_LINK_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE) +set(CMAKE_Swift_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") +set(CMAKE_Swift_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE) -set(CMAKE_Swift_LINK_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") -set(CMAKE_Swift_LINK_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE) +set(CMAKE_Swift_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") +set(CMAKE_Swift_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE) -set(CMAKE_Swift_LINK_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") -set(CMAKE_Swift_LINK_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) +set(CMAKE_Swift_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") +set(CMAKE_Swift_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) diff --git a/Modules/Platform/Apple-NVIDIA-CUDA.cmake b/Modules/Platform/Apple-NVIDIA-CUDA.cmake index ba669e1..0b8bbd9 100644 --- a/Modules/Platform/Apple-NVIDIA-CUDA.cmake +++ b/Modules/Platform/Apple-NVIDIA-CUDA.cmake @@ -20,14 +20,14 @@ set(CMAKE_CUDA_CREATE_SHARED_MODULE "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHAR # Defines host link features for frameworks -set(CMAKE_CUDA_LINK_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") -set(CMAKE_CUDA_LINK_USING_FRAMEWORK_SUPPORTED TRUE) +set(CMAKE_CUDA_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") +set(CMAKE_CUDA_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE) -set(CMAKE_CUDA_LINK_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") -set(CMAKE_CUDA_LINK_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE) +set(CMAKE_CUDA_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") +set(CMAKE_CUDA_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE) -set(CMAKE_CUDA_LINK_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") -set(CMAKE_CUDA_LINK_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE) +set(CMAKE_CUDA_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") +set(CMAKE_CUDA_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE) -set(CMAKE_CUDA_LINK_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") -set(CMAKE_CUDA_LINK_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) +set(CMAKE_CUDA_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") +set(CMAKE_CUDA_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index d7b615c..74411e9 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -108,17 +108,17 @@ foreach(lang C CXX Fortran OBJC OBJCXX) set(CMAKE_${lang}_FRAMEWORK_SEARCH_FLAG -F) # Defines link features for frameworks - set(CMAKE_${lang}_LINK_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") - set(CMAKE_${lang}_LINK_USING_FRAMEWORK_SUPPORTED TRUE) + set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") + set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE) - set(CMAKE_${lang}_LINK_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") - set(CMAKE_${lang}_LINK_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE) + set(CMAKE_${lang}_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") + set(CMAKE_${lang}_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE) - set(CMAKE_${lang}_LINK_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") - set(CMAKE_${lang}_LINK_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE) + set(CMAKE_${lang}_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") + set(CMAKE_${lang}_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE) - set(CMAKE_${lang}_LINK_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") - set(CMAKE_${lang}_LINK_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) + set(CMAKE_${lang}_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") + set(CMAKE_${lang}_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) endforeach() # default to searching for frameworks first diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index e6073cb..d22a4f2 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -192,13 +192,14 @@ inline std::string ExtractFeature(std::string const& item) bool IsFeatureSupported(cmMakefile* makefile, std::string const& linkLanguage, std::string const& feature) { - auto featureSupported = - cmStrCat("CMAKE_", linkLanguage, "_LINK_USING_", feature, "_SUPPORTED"); + auto featureSupported = cmStrCat( + "CMAKE_", linkLanguage, "_LINK_LIBRARY_USING_", feature, "_SUPPORTED"); if (makefile->GetDefinition(featureSupported).IsOn()) { return true; } - featureSupported = cmStrCat("CMAKE_LINK_USING_", feature, "_SUPPORTED"); + featureSupported = + cmStrCat("CMAKE_LINK_LIBRARY_USING_", feature, "_SUPPORTED"); return makefile->GetDefinition(featureSupported).IsOn(); } } @@ -650,9 +651,9 @@ void cmComputeLinkDepends::AddLinkEntries(int depender_index, feature, "', which is undefined or unsupported.\nDid you miss to " "define it by setting variables \"CMAKE_", - this->LinkLanguage, "_LINK_USING_", feature, - "\" and \"CMAKE_", this->LinkLanguage, "_LINK_USING_", - feature, "_SUPPORTED\"?"), + this->LinkLanguage, "_LINK_LIBRARY_USING_", feature, + "\" and \"CMAKE_", this->LinkLanguage, + "_LINK_LIBRARY_USING_", feature, "_SUPPORTED\"?"), this->Target->GetBacktrace()); } } diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index cf8c9a1..9df2044 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -674,11 +674,11 @@ bool cmComputeLinkInformation::AddLibraryFeature(std::string const& feature) } auto featureName = - cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_USING_", feature); + cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_LIBRARY_USING_", feature); cmValue featureSupported = this->Makefile->GetDefinition(cmStrCat(featureName, "_SUPPORTED")); if (!featureSupported.IsOn()) { - featureName = cmStrCat("CMAKE_LINK_USING_", feature); + featureName = cmStrCat("CMAKE_LINK_LIBRARY_USING_", feature); featureSupported = this->Makefile->GetDefinition(cmStrCat(featureName, "_SUPPORTED")); } diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature2.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature2.cmake index 15b5ca0..2c9efce 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature2.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature2.cmake @@ -1,6 +1,6 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE) add_library(dep SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature3-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature3-stderr.txt index 69963fe..48cf51e 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature3-stderr.txt +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature3-stderr.txt @@ -1,5 +1,5 @@ CMake Error at bad-feature3.cmake:[0-9]+ \(add_library\): - Feature 'feat', specified by variable 'CMAKE_C_LINK_USING_feat', is + Feature 'feat', specified by variable 'CMAKE_C_LINK_LIBRARY_USING_feat', is malformed \("<LIBRARY>", "<LIB_ITEM>", or "<LINK_ITEM>" patterns are missing\) and cannot be used to link target 'lib'. Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature3.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature3.cmake index 7960465..dab6a64 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature3.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature3.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat "") +set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat "") add_library(dep SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature4-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature4-stderr.txt index 7385115..c074dd0 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature4-stderr.txt +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature4-stderr.txt @@ -1,5 +1,5 @@ CMake Error at bad-feature4.cmake:[0-9]+ \(add_library\): - Feature 'feat', specified by variable 'CMAKE_C_LINK_USING_feat', is + Feature 'feat', specified by variable 'CMAKE_C_LINK_LIBRARY_USING_feat', is malformed \("<LIBRARY>", "<LIB_ITEM>", or "<LINK_ITEM>" patterns are missing\) and cannot be used to link target 'lib'. Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature4.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature4.cmake index b40cfaf..6942f7c 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature4.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature4.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat "-opt") +set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat "-opt") add_library(dep SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature5-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature5-stderr.txt index 9894577..6604307 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature5-stderr.txt +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature5-stderr.txt @@ -1,5 +1,5 @@ CMake Error at bad-feature5.cmake:[0-9]+ \(add_library\): - Feature 'feat', specified by variable 'CMAKE_C_LINK_USING_feat', is + Feature 'feat', specified by variable 'CMAKE_C_LINK_LIBRARY_USING_feat', is malformed \(wrong number of elements\) and cannot be used to link target 'lib'. Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature5.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature5.cmake index 8ce1ecf..d0a827a 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature5.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature5.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat "-prefix" "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat "-prefix" "<LIBRARY>") add_library(dep SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature6-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature6-stderr.txt index d8d0e19..9de4ffa 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature6-stderr.txt +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature6-stderr.txt @@ -1,5 +1,5 @@ CMake Error at bad-feature6.cmake:[0-9]+ \(add_library\): - Feature 'feat', specified by variable 'CMAKE_C_LINK_USING_feat', is + Feature 'feat', specified by variable 'CMAKE_C_LINK_LIBRARY_USING_feat', is malformed \("<LIBRARY>", "<LIB_ITEM>", or "<LINK_ITEM>" patterns are missing for "PATH{}" alternative\) and cannot be used to link target 'lib'. Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature6.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature6.cmake index 7b72ad5..04a50f8 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature6.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature6.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat "PATH{}NAME{<LIBRARY>}") +set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat "PATH{}NAME{<LIBRARY>}") add_library(dep SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature7-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature7-stderr.txt index 2a498cd..9ea9936 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature7-stderr.txt +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature7-stderr.txt @@ -1,5 +1,5 @@ CMake Error at bad-feature7.cmake:[0-9]+ \(add_library\): - Feature 'feat', specified by variable 'CMAKE_C_LINK_USING_feat', is + Feature 'feat', specified by variable 'CMAKE_C_LINK_LIBRARY_USING_feat', is malformed \("<LIBRARY>", "<LIB_ITEM>", or "<LINK_ITEM>" patterns are missing for "NAME{}" alternative\) and cannot be used to link target 'lib'. Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature7.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature7.cmake index 173f86c..9659811 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature7.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature7.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat "NAME{}PATH{<LIBRARY>}") +set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat "NAME{}PATH{<LIBRARY>}") add_library(dep SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/compatible-features.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/compatible-features.cmake index 2579a5f..fb88e36 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/compatible-features.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/compatible-features.cmake @@ -1,10 +1,10 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat1 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1 "<LIBRARY>") -set(CMAKE_C_LINK_USING_feat2_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat2 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat2_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat2 "<LIBRARY>") add_library(dep1 SHARED empty.c) @@ -15,7 +15,7 @@ add_library(dep3 SHARED empty.c) target_link_libraries(dep3 PUBLIC dep2) add_library(lib1 SHARED empty.c) -target_link_libraries(lib1 PRIVATE $<LINK_LIBRARY:feat2,dep1,dep2>) +target_link_libraries(lib1 PRIVATE "$<LINK_LIBRARY:feat2,dep1,dep2>") add_library(lib2 SHARED empty.c) -target_link_libraries(lib2 PRIVATE $<LINK_LIBRARY:DEFAULT,dep2,dep3>) +target_link_libraries(lib2 PRIVATE "$<LINK_LIBRARY:DEFAULT,dep2,dep3>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/feature-not-supported.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/feature-not-supported.cmake index 0666227..0d952c2 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/feature-not-supported.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/feature-not-supported.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat_SUPPORTED FALSE) -set(CMAKE_C_LINK_USING_feat "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED FALSE) +set(CMAKE_C_LINK_LIBRARY_USING_feat "<LIBRARY>") add_library(dep SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features1.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features1.cmake index d96b214..c230c4f 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features1.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features1.cmake @@ -1,10 +1,10 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat1 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1 "<LIBRARY>") -set(CMAKE_C_LINK_USING_feat2_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat2 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat2_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat2 "<LIBRARY>") add_library(dep1 SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features2.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features2.cmake index 1845fdb..d204ebd 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features2.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features2.cmake @@ -1,10 +1,10 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat1 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1 "<LIBRARY>") -set(CMAKE_C_LINK_USING_feat2_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat2 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat2_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat2 "<LIBRARY>") add_library(dep1 SHARED empty.c) @@ -12,4 +12,4 @@ add_library(dep2 SHARED empty.c) target_link_libraries(dep2 PUBLIC dep1) add_library(lib SHARED empty.c) -target_link_libraries(lib PRIVATE $<LINK_LIBRARY:feat2,dep1,dep2>) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feat2,dep1,dep2>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake index 1198d91..bf79e11 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake @@ -1,15 +1,15 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat1 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1 "<LIBRARY>") -set(CMAKE_C_LINK_USING_feat2_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat2 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat2_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat2 "<LIBRARY>") add_library(dep1 SHARED empty.c) add_library(dep2 SHARED empty.c) -target_link_libraries(dep2 PUBLIC $<LINK_LIBRARY:feat1,dep1>) +target_link_libraries(dep2 PUBLIC "$<LINK_LIBRARY:feat1,dep1>") add_library(lib SHARED empty.c) target_link_libraries(lib PRIVATE dep1 dep2) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake index e000b97..a888bb8 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat "<LIBRARY>") add_library(dep OBJECT empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/nested-compatible-features.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/nested-compatible-features.cmake index d3b04e8..561aa09 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/nested-compatible-features.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/nested-compatible-features.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat1 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1 "<LIBRARY>") add_library(dep1 SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/nested-incompatible-features.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/nested-incompatible-features.cmake index 8565fa9..746638e 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/nested-incompatible-features.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/nested-incompatible-features.cmake @@ -1,10 +1,10 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat1 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1 "<LIBRARY>") -set(CMAKE_C_LINK_USING_feat2_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat2 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat2_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat2 "<LIBRARY>") add_library(dep1 SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/only-targets.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/only-targets.cmake index e29ad6c..8cec0c3 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/only-targets.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/only-targets.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat1 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1 "<LIBRARY>") set(CMAKE_LINK_LIBRARIES_ONLY_TARGETS 1) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/override-features3.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/override-features3.cmake index 7f010fd..a1437e6 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/override-features3.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/override-features3.cmake @@ -1,7 +1,7 @@ include(incompatible-features1.cmake) -set(CMAKE_C_LINK_USING_feat3_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat3 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat3_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat3 "<LIBRARY>") set_property(TARGET lib PROPERTY LINK_LIBRARY_OVERRIDE "feat3,dep1") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/override-features4.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/override-features4.cmake index 405cc8a..f34f745 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/override-features4.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/override-features4.cmake @@ -2,8 +2,8 @@ include(incompatible-features1.cmake) -set(CMAKE_C_LINK_USING_feat3_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat3 "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat3_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat3 "<LIBRARY>") set_property(TARGET lib PROPERTY LINK_LIBRARY_OVERRIDE "feat3,dep1") set_property(TARGET lib PROPERTY LINK_LIBRARY_OVERRIDE_dep1 feat1) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/target_link_options.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/target_link_options.cmake index 800124c..a989a53 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/target_link_options.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/target_link_options.cmake @@ -1,4 +1,4 @@ enable_language(C) add_library(empty SHARED empty.c) -target_link_options(empty PRIVATE $<LINK_LIBRARY:FEAT>) +target_link_options(empty PRIVATE "$<LINK_LIBRARY:FEAT>") diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake index ced689e..1581611 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/LINK_LIBRARY.cmake @@ -12,28 +12,28 @@ endif() add_library(base1 SHARED base.c) add_library(base2 SHARED base.c) -set(CMAKE_C_LINK_USING_feat1 "--LIBFLAG<LIBRARY>") -set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1 "--LIBFLAG<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat1_1 "--LIBFLAG_C<LIBRARY>") -set(CMAKE_C_LINK_USING_feat1_1_SUPPORTED FALSE) -set(CMAKE_LINK_USING_feat1_1 "--LIBFLAG<LIBRARY>") -set(CMAKE_LINK_USING_feat1_1_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat1_1 "--LIBFLAG_C<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_USING_feat1_1_SUPPORTED FALSE) +set(CMAKE_LINK_LIBRARY_USING_feat1_1 "--LIBFLAG<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feat1_1_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat2 "--PREFIXGROUP" "--LIBGROUP<LIBRARY>" "--SUFFIXGROUP") -set(CMAKE_C_LINK_USING_feat2_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat2 "--PREFIXGROUP" "--LIBGROUP<LIBRARY>" "--SUFFIXGROUP") +set(CMAKE_C_LINK_LIBRARY_USING_feat2_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat3 "--PREFIXGROUP" "<LINK_ITEM>" "--SUFFIXGROUP") -set(CMAKE_C_LINK_USING_feat3_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat3 "--PREFIXGROUP" "<LINK_ITEM>" "--SUFFIXGROUP") +set(CMAKE_C_LINK_LIBRARY_USING_feat3_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat4 "--PREFIXGROUP" "--LIBFLAG<LIBRARY> --ITEMFLAG<LIB_ITEM>" "--SUFFIXGROUP") -set(CMAKE_C_LINK_USING_feat4_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat4 "--PREFIXGROUP" "--LIBFLAG<LIBRARY> --ITEMFLAG<LIB_ITEM>" "--SUFFIXGROUP") +set(CMAKE_C_LINK_LIBRARY_USING_feat4_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat5 "--PREFIXGROUP" "PATH{--LIBFLAG<LIBRARY>}NAME{--ITEMFLAG<LIB_ITEM>}" "--SUFFIXGROUP") -set(CMAKE_C_LINK_USING_feat5_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat5 "--PREFIXGROUP" "PATH{--LIBFLAG<LIBRARY>}NAME{--ITEMFLAG<LIB_ITEM>}" "--SUFFIXGROUP") +set(CMAKE_C_LINK_LIBRARY_USING_feat5_SUPPORTED TRUE) -set(CMAKE_C_LINK_USING_feat6 "<LINK_ITEM>") -set(CMAKE_C_LINK_USING_feat6_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_feat6 "<LINK_ITEM>") +set(CMAKE_C_LINK_LIBRARY_USING_feat6_SUPPORTED TRUE) add_library(LinkLibrary_simple1 SHARED lib.c) @@ -77,28 +77,28 @@ target_link_libraries(LinkLibrary_mix_features2 PRIVATE "$<LINK_LIBRARY:feat2,ba target_link_libraries(base3 INTERFACE other1) add_library(LinkLibrary_mix_features3 SHARED lib.c) -target_link_libraries(LinkLibrary_mix_features3 PRIVATE base2 $<LINK_LIBRARY:feat2,base1,base3> other2) +target_link_libraries(LinkLibrary_mix_features3 PRIVATE base2 "$<LINK_LIBRARY:feat2,base1,base3>" other2) # testing LINK_LIBRARY_OVERRIDE property add_library(LinkLibrary_override_features1 SHARED lib.c) -target_link_libraries(LinkLibrary_override_features1 PRIVATE $<LINK_LIBRARY:feat1,base1,base3>) +target_link_libraries(LinkLibrary_override_features1 PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>") set_property(TARGET LinkLibrary_override_features1 PROPERTY LINK_LIBRARY_OVERRIDE "feat1,base1") add_library(LinkLibrary_override_features2 SHARED lib.c) -target_link_libraries(LinkLibrary_override_features2 PRIVATE $<LINK_LIBRARY:feat1,base1,base3>) +target_link_libraries(LinkLibrary_override_features2 PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>") set_property(TARGET LinkLibrary_override_features2 PROPERTY LINK_LIBRARY_OVERRIDE "feat2,base1,other1") add_library(LinkLibrary_override_with_default SHARED lib.c) -target_link_libraries(LinkLibrary_override_with_default PRIVATE $<LINK_LIBRARY:feat1,base1,base3>) +target_link_libraries(LinkLibrary_override_with_default PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>") set_property(TARGET LinkLibrary_override_with_default PROPERTY LINK_LIBRARY_OVERRIDE "$<$<LINK_LANGUAGE:C>:DEFAULT,base1,other1>") # testing LINK_LIBRARY_OVERRIDE_<LIBRARY> property add_library(LinkLibrary_override_features3 SHARED lib.c) -target_link_libraries(LinkLibrary_override_features3 PRIVATE $<LINK_LIBRARY:feat1,base1,base3>) +target_link_libraries(LinkLibrary_override_features3 PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>") set_property(TARGET LinkLibrary_override_features3 PROPERTY LINK_LIBRARY_OVERRIDE_base1 feat1) add_library(LinkLibrary_override_features4 SHARED lib.c) -target_link_libraries(LinkLibrary_override_features4 PRIVATE $<LINK_LIBRARY:feat1,base1,base3>) +target_link_libraries(LinkLibrary_override_features4 PRIVATE "$<LINK_LIBRARY:feat1,base1,base3>") set_property(TARGET LinkLibrary_override_features4 PROPERTY LINK_LIBRARY_OVERRIDE "feat3,base1,other1") set_property(TARGET LinkLibrary_override_features4 PROPERTY LINK_LIBRARY_OVERRIDE_base1 feat2) set_property(TARGET LinkLibrary_override_features4 PROPERTY LINK_LIBRARY_OVERRIDE_other1 feat2) diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt index b3a86cc..981376a 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/imported-target-stdout.txt @@ -4,8 +4,8 @@ CMake Warning \(dev\) at imported-target.cmake:[0-9]+ \(add_library\): unsupported. Did you miss to define it by setting variables - "CMAKE_C_LINK_USING_whole_archive" and - "CMAKE_C_LINK_USING_whole_archive_SUPPORTED"\? + "CMAKE_C_LINK_LIBRARY_USING_whole_archive" and + "CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED"\? 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/target_link_libraries-LINK_LIBRARY/weak_library.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/weak_library.cmake index 135326e..45b4f66 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/weak_library.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/weak_library.cmake @@ -2,11 +2,11 @@ enable_language(C) if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang") - set(CMAKE_LINK_USING_weak_library "PATH{-weak_library <LIBRARY>}NAME{LINKER:-weak-l<LIB_ITEM>}") - set(CMAKE_LINK_USING_weak_library_SUPPORTED TRUE) + set(CMAKE_LINK_LIBRARY_USING_weak_library "PATH{-weak_library <LIBRARY>}NAME{LINKER:-weak-l<LIB_ITEM>}") + set(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED TRUE) else() # feature not yet supported for the other environments - set(CMAKE_LINK_USING_whole_library_SUPPORTED FALSE) + set(CMAKE_LINK_LIBRARY_USING_whole_library_SUPPORTED FALSE) endif() add_library(lib SHARED base.c lib.c unref.c) diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake index 5214565..93082a4 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/whole_archive.cmake @@ -1,27 +1,27 @@ enable_language(C) -set(CMAKE_C_LINK_USING_whole_archive_SUPPORTED TRUE) +set(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED TRUE) if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang") - set(CMAKE_C_LINK_USING_whole_archive "-force_load <LIB_ITEM>") + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "-force_load <LIB_ITEM>") elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux") execute_process(COMMAND "${CMAKE_LINKER}" --help OUTPUT_VARIABLE linker_help ERROR_VARIABLE linker_help) if(linker_help MATCHES "--push-state" AND linker_help MATCHES "--pop-state") - set(CMAKE_C_LINK_USING_whole_archive "LINKER:--push-state,--whole-archive" - "<LINK_ITEM>" - "LINKER:--pop-state") + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "LINKER:--push-state,--whole-archive" + "<LINK_ITEM>" + "LINKER:--pop-state") else() - set(CMAKE_C_LINK_USING_whole_archive "LINKER:--whole-archive" - "<LINK_ITEM>" - "LINKER:--no-whole-archive") + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "LINKER:--whole-archive" + "<LINK_ITEM>" + "LINKER:--no-whole-archive") endif() elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_C_LINK_USING_whole_archive "/WHOLEARCHIVE:<LIBRARY>") + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "/WHOLEARCHIVE:<LIBRARY>") else() # feature not yet supported for the other environments - set(CMAKE_C_LINK_USING_whole_archive_SUPPORTED FALSE) + set(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED FALSE) endif() add_library(base STATIC base.c unref.c) |