diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/install.rst | 7 | ||||
-rw-r--r-- | Help/generator/Ninja Multi-Config.rst | 40 | ||||
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 8 | ||||
-rw-r--r-- | Help/manual/cmake-properties.7.rst | 3 | ||||
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/policy/CMP0103.rst | 22 | ||||
-rw-r--r-- | Help/prop_sf/VS_SETTINGS.rst | 18 | ||||
-rw-r--r-- | Help/prop_tgt/PCH_WARN_INVALID.rst | 8 | ||||
-rw-r--r-- | Help/prop_tgt/VS_SOURCE_SETTINGS_tool.rst | 19 | ||||
-rw-r--r-- | Help/prop_tgt/XCODE_GENERATE_SCHEME.rst | 1 | ||||
-rw-r--r-- | Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst | 4 | ||||
-rw-r--r-- | Help/release/dev/export-multiple-calls.rst | 5 | ||||
-rw-r--r-- | Help/release/dev/pch-warn-invalid.rst | 6 | ||||
-rw-r--r-- | Help/release/dev/vs-non-built-file-item-metadata.rst | 10 | ||||
-rw-r--r-- | Help/variable/CMAKE_CROSS_CONFIGS.rst | 12 | ||||
-rw-r--r-- | Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst | 10 | ||||
-rw-r--r-- | Help/variable/CMAKE_DEFAULT_CONFIGS.rst | 16 | ||||
-rw-r--r-- | Help/variable/CMAKE_PCH_WARN_INVALID.rst | 5 | ||||
-rw-r--r-- | Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst | 4 |
19 files changed, 152 insertions, 47 deletions
diff --git a/Help/command/install.rst b/Help/command/install.rst index abf6b17..cf04eda 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -644,6 +644,13 @@ present, causes the contents of the properties matching ``(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?`` to be exported, when policy :policy:`CMP0022` is ``NEW``. +.. note:: + The installed ``<export-name>.cmake`` file may come with additional + per-configuration ``<export-name>-*.cmake`` files to be loaded by + globbing. Do not use an export name that is the same as the package + name in combination with installing a ``<package-name>-config.cmake`` + file or the latter may be incorrectly matched by the glob and loaded. + When a ``COMPONENT`` option is given, the listed ``<component>`` implicitly depends on all components mentioned in the export set. The exported ``<name>.cmake`` file will require each of the exported components to be diff --git a/Help/generator/Ninja Multi-Config.rst b/Help/generator/Ninja Multi-Config.rst index 1f68535..f480eb8 100644 --- a/Help/generator/Ninja Multi-Config.rst +++ b/Help/generator/Ninja Multi-Config.rst @@ -33,53 +33,19 @@ below for how to enable cross-config mode. The ``Ninja Multi-Config`` generator recognizes the following variables: :variable:`CMAKE_CONFIGURATION_TYPES` - Specifies the total set of configurations to build. See the variable's - documentation for more information. + Specifies the total set of configurations to build. :variable:`CMAKE_CROSS_CONFIGS` Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations available from all ``build-<Config>.ninja`` files. - This variable activates cross-config mode. - Targets from each config specified in this variable can be built from any - ``build-<Config>.ninja`` file. Custom commands will use the configuration - native to ``build-<Config>.ninja``. If it is set to ``all``, all - configurations from :variable:`CMAKE_CONFIGURATION_TYPES` are cross-configs. - If it is not specified, or empty, each ``build-<Config>.ninja`` file will - only contain build rules for its own configuration. - - The value of this variable must be a subset of - :variable:`CMAKE_CONFIGURATION_TYPES`. :variable:`CMAKE_DEFAULT_BUILD_TYPE` - Specifies the configuration to use by default in a ``build.ninja`` file. If - this variable is specified, ``build.ninja`` uses build rules from - ``build-<Config>.ninja`` by default. All custom commands are executed with - this configuration. If the variable is not specified, the first item from - :variable:`CMAKE_CONFIGURATION_TYPES` is used instead. - - The value of this variable must be one of the items from - :variable:`CMAKE_CONFIGURATION_TYPES`. + Specifies the configuration to use by default in a ``build.ninja`` file. :variable:`CMAKE_DEFAULT_CONFIGS` Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations to build for a target in ``build.ninja`` - if no ``:<Config>`` suffix is specified. If it is set to ``all``, all - configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If - it is not specified, it defaults to - :variable:`CMAKE_DEFAULT_BUILD_TYPE`. - - For example, if you set - :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``, but - set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``, - all ``<target>`` aliases in ``build.ninja`` will resolve to - ``<target>:Debug`` or ``<target>:all``, but custom commands will still use - the ``Release`` configuration. - - The value of this variable must be a subset of - :variable:`CMAKE_CROSS_CONFIGS` or be the same as - :variable:`CMAKE_DEFAULT_BUILD_TYPE`. It must not be - specified if :variable:`CMAKE_DEFAULT_BUILD_TYPE` or - :variable:`CMAKE_CROSS_CONFIGS` is not used. + if no ``:<Config>`` suffix is specified. Consider the following example: diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index c256250..08d59e7 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used to determine whether to report an error on use of deprecated macros or functions. +Policies Introduced by CMake 3.18 +================================= + +.. toctree:: + :maxdepth: 1 + + CMP0103: Multiple export() with same FILE without APPEND is not allowed. </policy/CMP0103> + Policies Introduced by CMake 3.17 ================================= diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index e552377..cbb2298 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -127,6 +127,7 @@ Properties on Targets /prop_tgt/ARCHIVE_OUTPUT_DIRECTORY /prop_tgt/ARCHIVE_OUTPUT_NAME_CONFIG /prop_tgt/ARCHIVE_OUTPUT_NAME + /prop_tgt/PCH_WARN_INVALID /prop_tgt/AUTOGEN_BUILD_DIR /prop_tgt/AUTOGEN_ORIGIN_DEPENDS /prop_tgt/AUTOGEN_PARALLEL @@ -377,6 +378,7 @@ Properties on Targets /prop_tgt/VS_SCC_PROVIDER /prop_tgt/VS_SDK_REFERENCES /prop_tgt/VS_SOLUTION_DEPLOY + /prop_tgt/VS_SOURCE_SETTINGS_tool /prop_tgt/VS_USER_PROPS /prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION /prop_tgt/VS_WINRT_COMPONENT @@ -486,6 +488,7 @@ Properties on Source Files /prop_sf/VS_DEPLOYMENT_LOCATION /prop_sf/VS_INCLUDE_IN_VSIX /prop_sf/VS_RESOURCE_GENERATOR + /prop_sf/VS_SETTINGS /prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS /prop_sf/VS_SHADER_ENABLE_DEBUG /prop_sf/VS_SHADER_ENTRYPOINT diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index c271024..62c301c 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -438,6 +438,7 @@ Variables that Control the Build /variable/CMAKE_OSX_ARCHITECTURES /variable/CMAKE_OSX_DEPLOYMENT_TARGET /variable/CMAKE_OSX_SYSROOT + /variable/CMAKE_PCH_WARN_INVALID /variable/CMAKE_PDB_OUTPUT_DIRECTORY /variable/CMAKE_PDB_OUTPUT_DIRECTORY_CONFIG /variable/CMAKE_POSITION_INDEPENDENT_CODE diff --git a/Help/policy/CMP0103.rst b/Help/policy/CMP0103.rst new file mode 100644 index 0000000..223e0cb --- /dev/null +++ b/Help/policy/CMP0103.rst @@ -0,0 +1,22 @@ +CMP0103 +------- + +Multiple calls to :command:`export` command with same ``FILE`` without +``APPEND`` is no longer allowed. + +In CMake 3.17 and below, multiple calls to :command:`export` command with the +same ``FILE`` without ``APPEND`` are accepted silently but only the last +occurrence is taken into account during the generation. + +The ``OLD`` behavior for this policy is to ignore the multiple occurrences of + :command:`export` command except the last one. + +The ``NEW`` behavior of this policy is to raise an error on second call to +:command:`export` command with same ``FILE`` without ``APPEND``. + +This policy was introduced in CMake version 3.18. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. +Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` +explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/prop_sf/VS_SETTINGS.rst b/Help/prop_sf/VS_SETTINGS.rst new file mode 100644 index 0000000..0719406 --- /dev/null +++ b/Help/prop_sf/VS_SETTINGS.rst @@ -0,0 +1,18 @@ +VS_SETTINGS +----------- + +Set any item metadata on a non-built file. + +Takes a list of ``Key=Value`` pairs. Tells the Visual Studio generator to set +``Key`` to ``Value`` as item metadata on the file. + +For example: + +.. code-block:: cmake + + set_property(SOURCE file.hlsl PROPERTY VS_SETTINGS "Key=Value" "Key2=Value2") + +will set ``Key`` to ``Value`` and ``Key2`` to ``Value2`` on the +``file.hlsl`` item as metadata. + +Generator expressions are supported. diff --git a/Help/prop_tgt/PCH_WARN_INVALID.rst b/Help/prop_tgt/PCH_WARN_INVALID.rst new file mode 100644 index 0000000..36ec348 --- /dev/null +++ b/Help/prop_tgt/PCH_WARN_INVALID.rst @@ -0,0 +1,8 @@ +PCH_WARN_INVALID +---------------- + +When this property is set to true, the precompile header compiler options +will contain a compiler flag wich should warn about invalid precompiled +headers e.g. ``-Winvalid-pch`` for GNU compiler. + +The defalut value is ``ON``. diff --git a/Help/prop_tgt/VS_SOURCE_SETTINGS_tool.rst b/Help/prop_tgt/VS_SOURCE_SETTINGS_tool.rst new file mode 100644 index 0000000..f706888 --- /dev/null +++ b/Help/prop_tgt/VS_SOURCE_SETTINGS_tool.rst @@ -0,0 +1,19 @@ +VS_SOURCE_SETTINGS_<tool> +------------------------- + +Set any item metadata on all non-built files that use <tool>. + +Takes a list of ``Key=Value`` pairs. Tells the Visual Studio generator +to set ``Key`` to ``Value`` as item metadata on all non-built files +that use ``<tool>``. + +For example: + +.. code-block:: cmake + + set_property(TARGET main PROPERTY VS_SOURCE_SETTINGS_FXCompile "Key=Value" "Key2=Value2") + +will set ``Key`` to ``Value`` and ``Key2`` to ``Value2`` for all +non-built files that use ``FXCompile``. + +Generator expressions are supported. diff --git a/Help/prop_tgt/XCODE_GENERATE_SCHEME.rst b/Help/prop_tgt/XCODE_GENERATE_SCHEME.rst index 0e182cf..c32b4de 100644 --- a/Help/prop_tgt/XCODE_GENERATE_SCHEME.rst +++ b/Help/prop_tgt/XCODE_GENERATE_SCHEME.rst @@ -38,3 +38,4 @@ The following target properties will be applied on the - :prop_tgt:`XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING` - :prop_tgt:`XCODE_SCHEME_ENVIRONMENT` - :prop_tgt:`XCODE_SCHEME_EXECUTABLE` +- :prop_tgt:`XCODE_SCHEME_WORKING_DIRECTORY` diff --git a/Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst b/Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst index 7ffa74b..f538f1d 100644 --- a/Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst +++ b/Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst @@ -1,8 +1,8 @@ XCODE_SCHEME_WORKING_DIRECTORY ------------------------------ -Specify the ``Working Directory`` a of the `Run` and `Profile` -action in the generated Xcode scheme. In case the value contains +Specify the ``Working Directory`` of the *Run* and *Profile* +actions in the generated Xcode scheme. In case the value contains generator expressions those are evaluated. This property is initialized by the value of the variable diff --git a/Help/release/dev/export-multiple-calls.rst b/Help/release/dev/export-multiple-calls.rst new file mode 100644 index 0000000..00372ce --- /dev/null +++ b/Help/release/dev/export-multiple-calls.rst @@ -0,0 +1,5 @@ +export-multiple-calls +--------------------- + +* The :command:`export` command now raise an error if used multiple times with + same ``FILE`` without ``APPEND``. See policy :policy:`CMP0103`. diff --git a/Help/release/dev/pch-warn-invalid.rst b/Help/release/dev/pch-warn-invalid.rst new file mode 100644 index 0000000..5fa3de7 --- /dev/null +++ b/Help/release/dev/pch-warn-invalid.rst @@ -0,0 +1,6 @@ +pch-warn-invalid +---------------- + +* The :variable:`CMAKE_PCH_WARN_INVALID` variable was added to initialize the + :prop_tgt:`PCH_WARN_INVALID` target property to allow the removal of the + precompiled header invalid warning. diff --git a/Help/release/dev/vs-non-built-file-item-metadata.rst b/Help/release/dev/vs-non-built-file-item-metadata.rst new file mode 100644 index 0000000..26cbad0 --- /dev/null +++ b/Help/release/dev/vs-non-built-file-item-metadata.rst @@ -0,0 +1,10 @@ +vs-non-built-file-item-metadata +------------------------------- + +* The :prop_tgt:`VS_SOURCE_SETTINGS_<tool>` target property was added + to tell :ref:`Visual Studio Generators` for VS 2010 and above to add + metadata to non-built source files using ``<tool>``. + +* The :prop_sf:`VS_SETTINGS` source file property was added to tell + :ref:`Visual Studio Generators` for VS 2010 and above to add + metadata to a non-built source file. diff --git a/Help/variable/CMAKE_CROSS_CONFIGS.rst b/Help/variable/CMAKE_CROSS_CONFIGS.rst index c850af2..94157f3 100644 --- a/Help/variable/CMAKE_CROSS_CONFIGS.rst +++ b/Help/variable/CMAKE_CROSS_CONFIGS.rst @@ -3,5 +3,13 @@ CMAKE_CROSS_CONFIGS Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations available from all ``build-<Config>.ninja`` files in the -:generator:`Ninja Multi-Config` generator. See the generator's -documentation for more details. +:generator:`Ninja Multi-Config` generator. This variable activates +cross-config mode. Targets from each config specified in this variable can be +built from any ``build-<Config>.ninja`` file. Custom commands will use the +configuration native to ``build-<Config>.ninja``. If it is set to ``all``, all +configurations from :variable:`CMAKE_CONFIGURATION_TYPES` are cross-configs. If +it is not specified, or empty, each ``build-<Config>.ninja`` file will only +contain build rules for its own configuration. + +The value of this variable must be a subset of +:variable:`CMAKE_CONFIGURATION_TYPES`. diff --git a/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst b/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst index 62ee0d2..aa4f82d 100644 --- a/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst +++ b/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst @@ -2,5 +2,11 @@ CMAKE_DEFAULT_BUILD_TYPE ------------------------ Specifies the configuration to use by default in a ``build.ninja`` file in the -:generator:`Ninja Multi-Config` generator. See the generator's documentation -for more details. +:generator:`Ninja Multi-Config` generator. If this variable is specified, +``build.ninja`` uses build rules from ``build-<Config>.ninja`` by default. All +custom commands are executed with this configuration. If the variable is not +specified, the first item from :variable:`CMAKE_CONFIGURATION_TYPES` is used +instead. + +The value of this variable must be one of the items from +:variable:`CMAKE_CONFIGURATION_TYPES`. diff --git a/Help/variable/CMAKE_DEFAULT_CONFIGS.rst b/Help/variable/CMAKE_DEFAULT_CONFIGS.rst index 86d8a5a..84c642a 100644 --- a/Help/variable/CMAKE_DEFAULT_CONFIGS.rst +++ b/Help/variable/CMAKE_DEFAULT_CONFIGS.rst @@ -3,5 +3,17 @@ CMAKE_DEFAULT_CONFIGS Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations to build for a target in ``build.ninja`` if no ``:<Config>`` suffix is specified in -the :generator:`Ninja Multi-Config` generator. -See the generator's documentation for more details. +the :generator:`Ninja Multi-Config` generator. If it is set to ``all``, all +configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If it is not +specified, it defaults to :variable:`CMAKE_DEFAULT_BUILD_TYPE`. + +For example, if you set :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``, +but set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``, all +``<target>`` aliases in ``build.ninja`` will resolve to ``<target>:Debug`` or +``<target>:all``, but custom commands will still use the ``Release`` +configuration. + +The value of this variable must be a subset of :variable:`CMAKE_CROSS_CONFIGS` +or be the same as :variable:`CMAKE_DEFAULT_BUILD_TYPE`. It must not be +specified if :variable:`CMAKE_DEFAULT_BUILD_TYPE` or +:variable:`CMAKE_CROSS_CONFIGS` is not used. diff --git a/Help/variable/CMAKE_PCH_WARN_INVALID.rst b/Help/variable/CMAKE_PCH_WARN_INVALID.rst new file mode 100644 index 0000000..e152abd --- /dev/null +++ b/Help/variable/CMAKE_PCH_WARN_INVALID.rst @@ -0,0 +1,5 @@ +CMAKE_PCH_WARN_INVALID +---------------------- + +This variable is used to initialize the :prop_tgt:`PCH_WARN_INVALID` +property of targets when they are created. diff --git a/Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst b/Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst index cc690f7..5bb7907 100644 --- a/Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst +++ b/Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst @@ -1,8 +1,8 @@ CMAKE_XCODE_SCHEME_WORKING_DIRECTORY ------------------------------------ -Specify the ``Working Directory`` a of the `Run` and `Profile` -action in the generated Xcode scheme. +Specify the ``Working Directory`` of the *Run* and *Profile* +actions in the generated Xcode scheme. This variable initializes the :prop_tgt:`XCODE_SCHEME_WORKING_DIRECTORY` |