diff options
Diffstat (limited to 'Help/variable')
-rw-r--r-- | Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.rst (renamed from Help/variable/CMAKE_LANG_LINK_USING_FEATURE.rst) | 12 | ||||
-rw-r--r-- | Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE_SUPPORTED.rst | 13 | ||||
-rw-r--r-- | Help/variable/CMAKE_LANG_LINK_USING_FEATURE_SUPPORTED.rst | 13 | ||||
-rw-r--r-- | Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.rst (renamed from Help/variable/CMAKE_LINK_USING_FEATURE.rst) | 15 | ||||
-rw-r--r-- | Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt (renamed from Help/variable/CMAKE_LINK_USING_FEATURE.txt) | 27 | ||||
-rw-r--r-- | Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE_SUPPORTED.rst | 14 | ||||
-rw-r--r-- | Help/variable/CMAKE_LINK_USING_FEATURE_SUPPORTED.rst | 14 | ||||
-rw-r--r-- | Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt | 8 |
8 files changed, 60 insertions, 56 deletions
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 |