diff options
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r-- | Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst | 3 | ||||
-rw-r--r-- | Help/prop_tgt/ARCHIVE_OUTPUT_NAME.rst | 3 | ||||
-rw-r--r-- | Help/prop_tgt/COMPILE_OPTIONS.rst | 4 | ||||
-rw-r--r-- | Help/prop_tgt/CUDA_CUBIN_COMPILATION.rst | 14 | ||||
-rw-r--r-- | Help/prop_tgt/CUDA_FATBIN_COMPILATION.rst | 14 | ||||
-rw-r--r-- | Help/prop_tgt/CUDA_OPTIX_COMPILATION.rst | 14 | ||||
-rw-r--r-- | Help/prop_tgt/DLL_NAME_WITH_SOVERSION.rst | 17 | ||||
-rw-r--r-- | Help/prop_tgt/ENABLE_EXPORTS.rst | 29 | ||||
-rw-r--r-- | Help/prop_tgt/IMPORTED_CONFIGURATIONS.rst | 27 | ||||
-rw-r--r-- | Help/prop_tgt/IMPORTED_IMPLIB.rst | 23 | ||||
-rw-r--r-- | Help/prop_tgt/IMPORTED_LOCATION.rst | 2 | ||||
-rw-r--r-- | Help/prop_tgt/LANG_CLANG_TIDY.rst | 5 | ||||
-rw-r--r-- | Help/prop_tgt/LANG_CPPCHECK.rst | 5 | ||||
-rw-r--r-- | Help/prop_tgt/LANG_CPPLINT.rst | 5 | ||||
-rw-r--r-- | Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst | 5 | ||||
-rw-r--r-- | Help/prop_tgt/LANG_LINKER_LAUNCHER.rst | 5 | ||||
-rw-r--r-- | Help/prop_tgt/MACOS_IMPORT_FILES.txt | 12 | ||||
-rw-r--r-- | Help/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION.rst | 11 |
18 files changed, 180 insertions, 18 deletions
diff --git a/Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst b/Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst index 677e06df0f..abb627cdad 100644 --- a/Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst +++ b/Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst @@ -6,4 +6,7 @@ ARCHIVE_OUTPUT_DIRECTORY .. |CMAKE_XXX_OUTPUT_DIRECTORY| replace:: :variable:`CMAKE_ARCHIVE_OUTPUT_DIRECTORY` .. include:: XXX_OUTPUT_DIRECTORY.txt +.. |IDEM| replace:: in the same directory +.. include:: MACOS_IMPORT_FILES.txt + See also the :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>` target property. diff --git a/Help/prop_tgt/ARCHIVE_OUTPUT_NAME.rst b/Help/prop_tgt/ARCHIVE_OUTPUT_NAME.rst index 6150193739..1f1c4671f1 100644 --- a/Help/prop_tgt/ARCHIVE_OUTPUT_NAME.rst +++ b/Help/prop_tgt/ARCHIVE_OUTPUT_NAME.rst @@ -5,4 +5,7 @@ ARCHIVE_OUTPUT_NAME .. |xxx| replace:: archive .. include:: XXX_OUTPUT_NAME.txt +.. |IDEM| replace:: with the same name +.. include:: MACOS_IMPORT_FILES.txt + See also the :prop_tgt:`ARCHIVE_OUTPUT_NAME_<CONFIG>` target property. diff --git a/Help/prop_tgt/COMPILE_OPTIONS.rst b/Help/prop_tgt/COMPILE_OPTIONS.rst index 2b93db177f..8b032adeee 100644 --- a/Help/prop_tgt/COMPILE_OPTIONS.rst +++ b/Help/prop_tgt/COMPILE_OPTIONS.rst @@ -11,6 +11,10 @@ The options will be added after flags in the variables, but before those propagated from dependencies by the :prop_tgt:`INTERFACE_COMPILE_OPTIONS` property. +This property adds compile options for all languages in a target. +Use the :genex:`COMPILE_LANGUAGE` generator expression to specify +per-language compile options. + This property is initialized by the :prop_dir:`COMPILE_OPTIONS` directory property when a target is created, and is used by the generators to set the options for the compiler. diff --git a/Help/prop_tgt/CUDA_CUBIN_COMPILATION.rst b/Help/prop_tgt/CUDA_CUBIN_COMPILATION.rst new file mode 100644 index 0000000000..f8860aeda3 --- /dev/null +++ b/Help/prop_tgt/CUDA_CUBIN_COMPILATION.rst @@ -0,0 +1,14 @@ +CUDA_CUBIN_COMPILATION +---------------------- + +.. versionadded:: 3.27 + +Compile CUDA sources to ``.cubin`` files instead of ``.obj`` files +within :ref:`Object Libraries`. + +For example: + +.. code-block:: cmake + + add_library(mycubin OBJECT a.cu b.cu) + set_property(TARGET mycubin PROPERTY CUDA_CUBIN_COMPILATION ON) diff --git a/Help/prop_tgt/CUDA_FATBIN_COMPILATION.rst b/Help/prop_tgt/CUDA_FATBIN_COMPILATION.rst new file mode 100644 index 0000000000..3d3c715339 --- /dev/null +++ b/Help/prop_tgt/CUDA_FATBIN_COMPILATION.rst @@ -0,0 +1,14 @@ +CUDA_FATBIN_COMPILATION +----------------------- + +.. versionadded:: 3.27 + +Compile CUDA sources to ``.fatbin`` files instead of ``.obj`` files +within :ref:`Object Libraries`. + +For example: + +.. code-block:: cmake + + add_library(myfbins OBJECT a.cu b.cu) + set_property(TARGET myfbins PROPERTY CUDA_FATBIN_COMPILATION ON) diff --git a/Help/prop_tgt/CUDA_OPTIX_COMPILATION.rst b/Help/prop_tgt/CUDA_OPTIX_COMPILATION.rst new file mode 100644 index 0000000000..c2a06a88b7 --- /dev/null +++ b/Help/prop_tgt/CUDA_OPTIX_COMPILATION.rst @@ -0,0 +1,14 @@ +CUDA_OPTIX_COMPILATION +---------------------- + +.. versionadded:: 3.27 + +Compile CUDA sources to ``.optixir`` files instead of ``.obj`` files +within :ref:`Object Libraries`. + +For example: + +.. code-block:: cmake + + add_library(myoptix OBJECT a.cu b.cu) + set_property(TARGET myoptix PROPERTY CUDA_OPTIX_COMPILATION ON) diff --git a/Help/prop_tgt/DLL_NAME_WITH_SOVERSION.rst b/Help/prop_tgt/DLL_NAME_WITH_SOVERSION.rst new file mode 100644 index 0000000000..59ef00f0a1 --- /dev/null +++ b/Help/prop_tgt/DLL_NAME_WITH_SOVERSION.rst @@ -0,0 +1,17 @@ +DLL_NAME_WITH_SOVERSION +----------------------- + +.. versionadded:: 3.27 + +This property control whether the :prop_tgt:`SOVERSION` target +property are added to the filename of generated DLL filenames +for the Windows platform, which is selected when the +:variable:`WIN32` variable is set. + +The value of the listed property is appended to the +basename of the runtime component of the shared library +target as ``-<SOVERSION>``. + +Please note that setting this property has no effect +if versioned filenames are globally disabled with the +:variable:`CMAKE_PLATFORM_NO_VERSIONED_SONAME` variable. diff --git a/Help/prop_tgt/ENABLE_EXPORTS.rst b/Help/prop_tgt/ENABLE_EXPORTS.rst index 0b1064ab4e..3e9b285534 100644 --- a/Help/prop_tgt/ENABLE_EXPORTS.rst +++ b/Help/prop_tgt/ENABLE_EXPORTS.rst @@ -1,7 +1,7 @@ ENABLE_EXPORTS -------------- -Specify whether an executable exports symbols for loadable modules. +Specify whether an executable or a shared library exports symbols. Normally an executable does not export any symbols because it is the final program. It is possible for an executable to export symbols to @@ -28,4 +28,29 @@ varies by platform: automatically bind symbols when the module is loaded. This property is initialized by the value of the variable -:variable:`CMAKE_ENABLE_EXPORTS` if it is set when a target is created. +:variable:`CMAKE_EXECUTABLE_ENABLE_EXPORTS` if it is set when an executable +target is created. + +.. versionadded:: 3.27 + On macOS, to link with a shared library (standard one as well as framework), + a linker import file (e.g. a text-based stubs file, with ``.tbd`` extension) + can be used instead of the shared library itself. + +The generation of these linker import files, as well as the consumption, is +controlled by this property. When this property is set to true, CMake will +generate a ``.tbd`` file for each shared library created by +:command:`add_library` command. This allow other targets to use this ``.tbd`` +file to link to the library with the :command:`target_link_libraries` +command. + +.. note:: + + For compatibility purpose, this property will be ignored if + :prop_tgt:`XCODE_ATTRIBUTE_GENERATE_TEXT_BASED_STUBS <XCODE_ATTRIBUTE_<an-attribute>>` + target property or the + :variable:`CMAKE_XCODE_ATTRIBUTE_GENERATE_TEXT_BASED_STUBS <CMAKE_XCODE_ATTRIBUTE_<an-attribute>>` + variable is set to ``NO``. + +This property is initialized by the value of the variable +:variable:`CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS` if it is set when a shared +library target is created. diff --git a/Help/prop_tgt/IMPORTED_CONFIGURATIONS.rst b/Help/prop_tgt/IMPORTED_CONFIGURATIONS.rst index 6de1baa235..a4746d3d16 100644 --- a/Help/prop_tgt/IMPORTED_CONFIGURATIONS.rst +++ b/Help/prop_tgt/IMPORTED_CONFIGURATIONS.rst @@ -1,11 +1,22 @@ IMPORTED_CONFIGURATIONS ----------------------- -Configurations provided for an IMPORTED target. - -Set this to the list of configuration names available for an IMPORTED -target. The names correspond to configurations defined in the project -from which the target is imported. If the importing project uses a -different set of configurations the names may be mapped using the -MAP_IMPORTED_CONFIG_<CONFIG> property. Ignored for non-imported -targets. +Configurations provided for an :ref:`imported target <Imported targets>`. + +Set this to the list of configuration names available for an imported +target. For each configuration named, the imported target's artifacts +must be specified in other target properties: + +* :prop_tgt:`IMPORTED_LOCATION_<CONFIG>`, or +* :prop_tgt:`IMPORTED_IMPLIB_<CONFIG>` (on DLL platforms, on AIX for + :ref:`Executables <Binary Executables>` or on Apple for + :ref:`Shared Libraries <Normal Libraries>`), or +* :prop_tgt:`IMPORTED_OBJECTS_<CONFIG>` (for :ref:`Object Libraries`), or +* :prop_tgt:`IMPORTED_LIBNAME_<CONFIG>` (for :ref:`Interface Libraries`). + +The configuration names correspond to those defined in the project from +which the target is imported. If the importing project uses a different +set of configurations, the names may be mapped using the +:prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` target property. + +The ``IMPORTED_CONFIGURATIONS`` property is ignored for non-imported targets. diff --git a/Help/prop_tgt/IMPORTED_IMPLIB.rst b/Help/prop_tgt/IMPORTED_IMPLIB.rst index c8b6fde95c..e67acbaa54 100644 --- a/Help/prop_tgt/IMPORTED_IMPLIB.rst +++ b/Help/prop_tgt/IMPORTED_IMPLIB.rst @@ -3,7 +3,22 @@ IMPORTED_IMPLIB Full path to the import library for an ``IMPORTED`` target. -Set this to the location of the ``.lib`` part of a Windows DLL, or on -AIX set it to an import file created for executables that export symbols -(see the :prop_tgt:`ENABLE_EXPORTS` target property). -Ignored for non-imported targets. +This property may be set: + +* On DLL platforms, to the location of the ``.lib`` part of the DLL. +* On AIX, to an import file (e.g. ``.imp``) created for executables that export + symbols (see the :prop_tgt:`ENABLE_EXPORTS` target property). +* On macOS, to an import file (e.g. ``.tbd``) created for shared libraries (see + the :prop_tgt:`ENABLE_EXPORTS` target property). For frameworks this is the + location of the ``.tbd`` file symlink just inside the framework folder. + +The ``IMPORTED_IMPLIB`` target property may be overridden for a +given configuration ``<CONFIG>`` by the configuration-specific +:prop_tgt:`IMPORTED_IMPLIB_<CONFIG>` target property. Furthermore, +the :prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` target property may be +used to map between a project's configurations and those of an imported +target. If none of these is set then the name of any other configuration +listed in the :prop_tgt:`IMPORTED_CONFIGURATIONS` target property may be +selected and its :prop_tgt:`IMPORTED_IMPLIB_<CONFIG>` value used. + +This property is ignored for non-imported targets. diff --git a/Help/prop_tgt/IMPORTED_LOCATION.rst b/Help/prop_tgt/IMPORTED_LOCATION.rst index ddd910aafb..a7207d845b 100644 --- a/Help/prop_tgt/IMPORTED_LOCATION.rst +++ b/Help/prop_tgt/IMPORTED_LOCATION.rst @@ -27,5 +27,5 @@ selected and its :prop_tgt:`IMPORTED_LOCATION_<CONFIG>` value used. To get the location of an imported target read one of the :prop_tgt:`LOCATION` or ``LOCATION_<CONFIG>`` properties. -For platforms with import libraries (e.g. Windows) see also +For platforms with import libraries (e.g. Windows, AIX or macOS) see also :prop_tgt:`IMPORTED_IMPLIB`. diff --git a/Help/prop_tgt/LANG_CLANG_TIDY.rst b/Help/prop_tgt/LANG_CLANG_TIDY.rst index 31f1876e3b..1e109334b8 100644 --- a/Help/prop_tgt/LANG_CLANG_TIDY.rst +++ b/Help/prop_tgt/LANG_CLANG_TIDY.rst @@ -25,3 +25,8 @@ command line. This property is initialized by the value of the :variable:`CMAKE_<LANG>_CLANG_TIDY` variable if it is set when a target is created. + +.. versionadded:: 3.27 + + This property supports + :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/prop_tgt/LANG_CPPCHECK.rst b/Help/prop_tgt/LANG_CPPCHECK.rst index 80acbc02a9..0b2dee6e6c 100644 --- a/Help/prop_tgt/LANG_CPPCHECK.rst +++ b/Help/prop_tgt/LANG_CPPCHECK.rst @@ -15,3 +15,8 @@ tool returns non-zero. This property is initialized by the value of the :variable:`CMAKE_<LANG>_CPPCHECK` variable if it is set when a target is created. + +.. versionadded:: 3.27 + + This property supports + :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/prop_tgt/LANG_CPPLINT.rst b/Help/prop_tgt/LANG_CPPLINT.rst index be6db46b36..38a1669c13 100644 --- a/Help/prop_tgt/LANG_CPPLINT.rst +++ b/Help/prop_tgt/LANG_CPPLINT.rst @@ -13,3 +13,8 @@ and report any problems. This property is initialized by the value of the :variable:`CMAKE_<LANG>_CPPLINT` variable if it is set when a target is created. + +.. versionadded:: 3.27 + + This property supports + :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst b/Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst index eebef561bb..19b97f7a47 100644 --- a/Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst +++ b/Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst @@ -13,3 +13,8 @@ compiler and report a warning if the tool reports any problems. This property is initialized by the value of the :variable:`CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE` variable if it is set when a target is created. + +.. versionadded:: 3.27 + + This property supports + :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/prop_tgt/LANG_LINKER_LAUNCHER.rst b/Help/prop_tgt/LANG_LINKER_LAUNCHER.rst index f6ca5ad43d..d39ec203aa 100644 --- a/Help/prop_tgt/LANG_LINKER_LAUNCHER.rst +++ b/Help/prop_tgt/LANG_LINKER_LAUNCHER.rst @@ -14,3 +14,8 @@ arguments to the tool. This is useful for tools such as static analyzers. This property is initialized by the value of the :variable:`CMAKE_<LANG>_LINKER_LAUNCHER` variable if it is set when a target is created. + +.. versionadded:: 3.27 + + The property value may use + :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/prop_tgt/MACOS_IMPORT_FILES.txt b/Help/prop_tgt/MACOS_IMPORT_FILES.txt new file mode 100644 index 0000000000..3c98fc8ca8 --- /dev/null +++ b/Help/prop_tgt/MACOS_IMPORT_FILES.txt @@ -0,0 +1,12 @@ +.. note:: + + On macOS, this property will be ignored for the linker import files (e.g. + ``.tbd`` files, see :prop_tgt:`ENABLE_EXPORTS` property for details) when: + + * The :prop_tgt:`FRAMEWORK` is set, because the framework layout cannot be + changed. + * The :generator:`Xcode` generator is used, due to the limitations and + constraints of the ``Xcode`` tool. + + In both cases, the linker import files will be generated |IDEM| as the shared + library. diff --git a/Help/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION.rst b/Help/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION.rst index 50cf203b06..ef3ceb0f76 100644 --- a/Help/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION.rst +++ b/Help/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION.rst @@ -7,6 +7,11 @@ Visual Studio Windows Target Platform Minimum Version For Windows 10. Specifies the minimum version of the OS that is being targeted. For example ``10.0.10240.0``. If the value is not specified, the -value of :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION` will be used on -WindowsStore projects otherwise the target platform minimum version will not -be specified for the project. +value of the :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION` variable +will be used on WindowsStore projects. Otherwise the target platform +minimum version will not be specified for the project. + +.. versionadded:: 3.27 + This property is initialized by the value of the + :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION` variable + if it is set when a target is created. |