summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Help/command/find_package.rst83
-rw-r--r--Help/command/list.rst26
-rw-r--r--Help/command/project.rst2
-rw-r--r--Help/command/string.rst19
-rw-r--r--Help/command/target_link_libraries.rst24
-rw-r--r--Help/envvar/CTEST_PROGRESS_OUTPUT.rst14
-rw-r--r--Help/manual/cmake-env-variables.7.rst1
-rw-r--r--Help/manual/ctest.1.rst21
-rw-r--r--Help/policy/CMP0077.rst44
-rw-r--r--Help/release/3.13.rst12
-rw-r--r--Help/release/dev/0-sample-topic.rst7
-rw-r--r--Help/release/index.rst2
-rw-r--r--Help/variable/CMAKE_OSX_VARIABLE.txt2
-rw-r--r--Modules/Compiler/Clang.cmake8
-rw-r--r--Modules/FindBLAS.cmake46
-rw-r--r--Modules/FindLAPACK.cmake12
-rw-r--r--Modules/FindPkgConfig.cmake4
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake6
-rw-r--r--Modules/Internal/CPack/CPackRPM.cmake2
-rw-r--r--Modules/NSIS.template.in4
-rw-r--r--Modules/Platform/Android-Clang.cmake1
-rw-r--r--Modules/Platform/GNU.cmake27
-rw-r--r--Modules/UseSWIG.cmake4
-rw-r--r--Source/CMakeVersion.cmake6
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx2
-rw-r--r--Source/CTest/cmParseGTMCoverage.cxx2
-rw-r--r--Source/cmProjectCommand.cxx20
-rw-r--r--Source/cmSystemTools.cxx4
-rw-r--r--Source/cmVS141CLFlagTable.h2
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h1
-rw-r--r--Tests/CMakeLib/testSystemTools.cxx2
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake83
-rw-r--r--Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/project/ProjectTwice.cmake26
-rw-r--r--Tests/RunCMake/project/RunCMakeTest.cmake1
-rw-r--r--Utilities/Release/upload_release.cmake2
38 files changed, 405 insertions, 128 deletions
diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst
index b486b7967c..3ad571cdb2 100644
--- a/Help/command/find_package.rst
+++ b/Help/command/find_package.rst
@@ -1,7 +1,16 @@
find_package
------------
-Load settings for an external project.
+.. only:: html
+
+ .. contents::
+
+Find an external project, and load its settings.
+
+.. _`basic signature`:
+
+Basic Signature and Module Mode
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@@ -15,7 +24,6 @@ will be set to indicate whether the package was found. When the
package is found package-specific information is provided through
variables and :ref:`Imported Targets` documented by the package itself. The
``QUIET`` option disables messages if the package cannot be found. The
-``MODULE`` option disables the second signature documented below. The
``REQUIRED`` option stops processing with an error message if the package
cannot be found.
@@ -33,25 +41,32 @@ should be compatible (format is ``major[.minor[.patch[.tweak]]]``). The
inside a find-module, the corresponding arguments are forwarded
automatically from the outer call (including the ``EXACT`` flag for
``[version]``). Version support is currently provided only on a
-package-by-package basis (details below).
+package-by-package basis (see the `Version Selection`_ section below).
-User code should generally look for packages using the above simple
-signature. The remainder of this command documentation specifies the
+See the :command:`cmake_policy` command documentation for discussion
+of the ``NO_POLICY_SCOPE`` option.
+
+The command has two modes by which it searches for packages: "Module"
+mode and "Config" mode. The above signature selects Module mode.
+If no module is found the command falls back to Config mode, described
+below. This fall back is disabled if the ``MODULE`` option is given.
+
+In Module mode, CMake searches for a file called ``Find<PackageName>.cmake``
+in the :variable:`CMAKE_MODULE_PATH` followed by the CMake installation.
+If the file is found, it is read and processed by CMake. It is responsible
+for finding the package, checking the version, and producing any needed
+messages. Some find-modules provide limited or no support for versioning;
+check the module documentation.
+
+Full Signature and Config Mode
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+User code should generally look for packages using the above `basic
+signature`_. The remainder of this command documentation specifies the
full command signature and details of the search process. Project
maintainers wishing to provide a package to be found by this command
are encouraged to read on.
-The command has two modes by which it searches for packages: "Module"
-mode and "Config" mode. Module mode is available when the command is
-invoked with the above reduced signature. CMake searches for a file
-called ``Find<PackageName>.cmake`` in the :variable:`CMAKE_MODULE_PATH`
-followed by the CMake installation. If the file is found, it is read
-and processed by CMake. It is responsible for finding the package,
-checking the version, and producing any needed messages. Many
-find-modules provide limited or no support for versioning; check
-the module documentation. If no module is found and the ``MODULE``
-option is not given the command proceeds to Config mode.
-
The complete Config mode command signature is::
find_package(<PackageName> [version] [EXACT] [QUIET]
@@ -76,12 +91,12 @@ The complete Config mode command signature is::
ONLY_CMAKE_FIND_ROOT_PATH |
NO_CMAKE_FIND_ROOT_PATH])
-The ``CONFIG`` option may be used to skip Module mode explicitly and
-switch to Config mode. It is synonymous to using ``NO_MODULE``. Config
-mode is also implied by use of options not specified in the reduced
-signature.
+The ``CONFIG`` option, the synonymous ``NO_MODULE`` option, or the use
+of options not specified in the `basic signature`_ all enforce pure Config
+mode. In pure Config mode, the command skips Module mode search and
+proceeds at once with Config mode search.
-Config mode attempts to locate a configuration file provided by the
+Config mode search attempts to locate a configuration file provided by the
package to be found. A cache entry called ``<PackageName>_DIR`` is created to
hold the directory containing the file. By default the command
searches for a package with the name ``<PackageName>``. If the ``NAMES`` option
@@ -107,6 +122,13 @@ fatal error is generated and the configure step stops executing. If
``<PackageName>_DIR`` has been set to a directory not containing a
configuration file CMake will ignore it and search from scratch.
+Package maintainers providing CMake package configuration files are
+encouraged to name and install them such that the `Search Procedure`_
+outlined below will find them without requiring use of additional options.
+
+Version Selection
+^^^^^^^^^^^^^^^^^
+
When the ``[version]`` argument is given Config mode will only find a
version of the package that claims compatibility with the requested
version (format is ``major[.minor[.patch[.tweak]]]``). If the ``EXACT``
@@ -187,17 +209,8 @@ For instance in order to select the highest version one can set::
before calling ``find_package``.
-Config mode provides an elaborate interface and search procedure.
-Much of the interface is provided for completeness and for use
-internally by find-modules loaded by Module mode. Most user code
-should simply call::
-
- find_package(<PackageName> [major[.minor]] [EXACT] [REQUIRED|QUIET])
-
-in order to find a package. Package maintainers providing CMake
-package configuration files are encouraged to name and install them
-such that the procedure outlined below will find them without
-requiring use of additional options.
+Search Procedure
+^^^^^^^^^^^^^^^^
CMake constructs a set of possible installation prefixes for the
package. Under each prefix several directories are searched for a
@@ -339,6 +352,9 @@ enabled.
Every non-REQUIRED ``find_package`` call can be disabled by setting the
:variable:`CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` variable to ``TRUE``.
+Package File Interface Variables
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
When loading a find module or package configuration file ``find_package``
defines variables to provide information about the call arguments (and
restores their original state before returning):
@@ -377,6 +393,3 @@ configuration file to handle components in a way that makes sense
for the package. The package configuration file may set
``<PackageName>_FOUND`` to false to tell ``find_package`` that component
requirements are not satisfied.
-
-See the :command:`cmake_policy` command documentation for discussion
-of the ``NO_POLICY_SCOPE`` option.
diff --git a/Help/command/list.rst b/Help/command/list.rst
index ad2c4282f8..2357a9b8d5 100644
--- a/Help/command/list.rst
+++ b/Help/command/list.rst
@@ -256,20 +256,24 @@ Reverses the contents of the list in-place.
list(SORT <list> [COMPARE <compare>] [CASE <case>] [ORDER <order>])
Sorts the list in-place alphabetically.
-Use the option ``<compare>`` to select the compare type for sorting.
-The ``<compare>`` option may be one of:
+Use the ``COMPARE`` keyword to select the comparison method for sorting.
+The ``<compare>`` option should be one of:
-* ``STRING``: Sorts a list of strings alphabetically.
-* ``FILE_BASENAME``: Sort a list of pathnames of files by their basenames.
+* ``STRING``: Sorts a list of strings alphabetically. This is the
+ default behavior if the ``COMPARE`` option is not given.
+* ``FILE_BASENAME``: Sorts a list of pathnames of files by their basenames.
-Use the option ``<case>`` to select a case sensitive or case insensitive sort mode.
-The ``<case>`` option may be one of:
+Use the ``CASE`` keyword to select a case sensitive or case insensitive
+sort mode. The ``<case>`` option should be one of:
-* ``SENSITIVE``: Sorts the list alphabetically.
-* ``INSENSITIVE``: Sorts the list alphabetically in descending order.
+* ``SENSITIVE``: List items are sorted in a case-sensitive manner. This is
+ the default behavior if the ``CASE`` option is not given.
+* ``INSENSITIVE``: List items are sorted case insensitively. The order of
+ items which differ only by upper/lowercase is not specified.
-Use the option ``<order>`` to select a case sensitive or case insensitive sort mode.
-The ``<order>`` option may be one of:
+To control the sort order, the ``ORDER`` keyword can be given.
+The ``<order>`` option should be one of:
-* ``ASCENDING``: Sorts the list in ascending order.
+* ``ASCENDING``: Sorts the list in ascending order. This is the default
+ behavior when the ``ORDER`` option is not given.
* ``DESCENDING``: Sorts the list in descending order.
diff --git a/Help/command/project.rst b/Help/command/project.rst
index c1de05786e..bd8b4ef5c4 100644
--- a/Help/command/project.rst
+++ b/Help/command/project.rst
@@ -44,6 +44,7 @@ Variables corresponding to unspecified versions are set to the empty string
If the optional ``DESCRIPTION`` is given, then :variable:`PROJECT_DESCRIPTION`
and :variable:`<PROJECT-NAME>_DESCRIPTION` will be set to its argument.
+These variables will be cleared if ``DESCRIPTION`` is not given.
The description is expected to be a relatively short string, usually no more
than a few words.
@@ -51,6 +52,7 @@ The optional ``HOMEPAGE_URL`` sets the analogous variables
:variable:`PROJECT_HOMEPAGE_URL` and :variable:`<PROJECT-NAME>_HOMEPAGE_URL`.
When this option is given, the URL provided should be the canonical home for
the project.
+These variables will be cleared if ``HOMEPAGE_URL`` is not given.
Note that the description and homepage URL may be used as defaults for
things like packaging meta-data, documentation, etc.
diff --git a/Help/command/string.rst b/Help/command/string.rst
index 29a153aac8..cc18069f4a 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -121,6 +121,11 @@ The following characters have special meaning in regular expressions:
Matches at end of input
``.``
Matches any single character
+``\<char>``
+ Matches the single character specified by ``<char>``. Use this to
+ match special regex characters, e.g. ``\.`` for a literal ``.``
+ or ``\\`` for a literal backslash ``\``. Escaping a non-special
+ character is unnecessary but allowed, e.g. ``\a`` matches ``a``.
``[ ]``
Matches any character(s) inside the brackets
``[^ ]``
@@ -151,12 +156,9 @@ has lower precedence than concatenation. This means that the regular
expression ``^ab+d$`` matches ``abbd`` but not ``ababd``, and the regular
expression ``^(ab|cd)$`` matches ``ab`` but not ``abd``.
-Backslash (``\``) characters in regular expressions are interpreted
-literally and do not escape anything or represent placeholders.
-However, CMake language :ref:`Escape Sequences` such as ``\t``,
-``\r``, ``\n``, and ``\\`` may be used to construct literal tabs,
-carriage returns, newlines, and backslashes (respectively) to pass
-in a regex. For example:
+CMake language :ref:`Escape Sequences` such as ``\t``, ``\r``, ``\n``,
+and ``\\`` may be used to construct literal tabs, carriage returns,
+newlines, and backslashes (respectively) to pass in a regex. For example:
* The quoted argument ``"[ \t\r\n]"`` specifies a regex that matches
any single whitespace character.
@@ -164,6 +166,11 @@ in a regex. For example:
a single forward slash ``/`` or backslash ``\``.
* The quoted argument ``"[A-Za-z0-9_]"`` specifies a regex that matches
any single "word" character in the C locale.
+* The quoted argument ``"\\(\\a\\+b\\)"`` specifies a regex that matches
+ the exact string ``(a+b)``. Each ``\\`` is parsed in a quoted argument
+ as just ``\``, so the regex itself is actually ``\(\a\+\b\)``. This
+ can alternatively be specified in a :ref:`bracket argument` without
+ having to escape the backslashes, e.g. ``[[\(\a\+\b\)]]``.
Manipulation
^^^^^^^^^^^^
diff --git a/Help/command/target_link_libraries.rst b/Help/command/target_link_libraries.rst
index e1c374e9c3..229d10c1f9 100644
--- a/Help/command/target_link_libraries.rst
+++ b/Help/command/target_link_libraries.rst
@@ -78,6 +78,20 @@ Each ``<item>`` may be:
flags explicitly. The flags will then be placed at the toolchain-defined
flag position in the link command.
+* **A generator expression**: A ``$<...>`` :manual:`generator expression
+ <cmake-generator-expressions(7)>` may evaluate to any of the above
+ items or to a :ref:`;-list <CMake Language Lists>` of them.
+ If the ``...`` contains any ``;`` characters, e.g. after evaluation
+ of a ``${list}`` variable, be sure to use an explicitly quoted
+ argument ``"$<...>"`` so that this command receives it as a
+ single ``<item>``.
+
+ Additionally, a generator expression may be used as a fragment of
+ any of the above items, e.g. ``foo$<1:_d>``.
+
+ Note that generator expressions will not be used in OLD handling of
+ policy :policy:`CMP0003` or policy :policy:`CMP0004`.
+
* A ``debug``, ``optimized``, or ``general`` keyword immediately followed
by another ``<item>``. The item following such a keyword will be used
only for the corresponding build configuration. The ``debug`` keyword
@@ -88,18 +102,16 @@ Each ``<item>`` may be:
optional. Higher granularity may be achieved for per-configuration
rules by creating and linking to
:ref:`IMPORTED library targets <Imported Targets>`.
+ These keywords are interpreted immediately by this command and therefore
+ have no special meaning when produced by a generator expression.
Items containing ``::``, such as ``Foo::Bar``, are assumed to be
:ref:`IMPORTED <Imported Targets>` or :ref:`ALIAS <Alias Targets>` library
target names and will cause an error if no such target exists.
See policy :policy:`CMP0028`.
-Arguments to ``target_link_libraries`` may use "generator expressions"
-with the syntax ``$<...>``. Note however, that generator expressions
-will not be used in OLD handling of :policy:`CMP0003` or :policy:`CMP0004`.
-See the :manual:`cmake-generator-expressions(7)` manual for available
-expressions. See the :manual:`cmake-buildsystem(7)` manual for more on
-defining buildsystem properties.
+See the :manual:`cmake-buildsystem(7)` manual for more on defining
+buildsystem properties.
Libraries for a Target and/or its Dependents
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/Help/envvar/CTEST_PROGRESS_OUTPUT.rst b/Help/envvar/CTEST_PROGRESS_OUTPUT.rst
new file mode 100644
index 0000000000..a8e15bc2fb
--- /dev/null
+++ b/Help/envvar/CTEST_PROGRESS_OUTPUT.rst
@@ -0,0 +1,14 @@
+CTEST_PROGRESS_OUTPUT
+---------------------
+
+Boolean environment variable that affects how :manual:`ctest <ctest(1)>`
+command output reports overall progress. When set to 1, TRUE, ON or anything
+else that evaluates to boolean true, progress is reported by repeatedly
+updating the same line. This greatly reduces the overall verbosity, but is
+only supported when output is sent directly to a terminal. If the environment
+variable is not set or has a value that evaluates to false, output is reported
+normally with each test having its own start and end lines logged to the
+output.
+
+The ``--progress`` option to :manual:`ctest <ctest(1)>` overrides this
+environment variable if both are given.
diff --git a/Help/manual/cmake-env-variables.7.rst b/Help/manual/cmake-env-variables.7.rst
index 42aeabc898..31aa723fec 100644
--- a/Help/manual/cmake-env-variables.7.rst
+++ b/Help/manual/cmake-env-variables.7.rst
@@ -53,5 +53,6 @@ Environment Variables for CTest
/envvar/CTEST_INTERACTIVE_DEBUG_MODE
/envvar/CTEST_OUTPUT_ON_FAILURE
/envvar/CTEST_PARALLEL_LEVEL
+ /envvar/CTEST_PROGRESS_OUTPUT
/envvar/CTEST_USE_LAUNCHERS_DEFAULT
/envvar/DASHBOARD_TEST_FROM_CTEST
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 9553d159ae..e24b10daf9 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -35,6 +35,19 @@ Options
which one should be tested. Example configurations are "Debug" and
"Release".
+``--progress``
+ Enable short progress output from tests.
+
+ When the output of ``ctest`` is being sent directly to a terminal, the
+ progress through the set of tests is reported by updating the same line
+ rather than printing start and end messages for each test on new lines.
+ This can significantly reduce the verbosity of the test output.
+ Test completion messages are still output on their own line for failed
+ tests and the final test summary will also still be logged.
+
+ This option can also be enabled by setting the environment variable
+ :envvar:`CTEST_PROGRESS_OUTPUT`.
+
``-V,--verbose``
Enable verbose output from tests.
@@ -55,8 +68,8 @@ Options
``--output-on-failure``
Output anything outputted by the test program if the test should fail.
- This option can also be enabled by setting the environment variable
- ``CTEST_OUTPUT_ON_FAILURE``.
+ This option can also be enabled by setting the
+ :envvar:`CTEST_OUTPUT_ON_FAILURE` environment variable
``-F``
Enable failover.
@@ -70,7 +83,7 @@ Options
This option tells CTest to run the tests in parallel using given
number of jobs. This option can also be set by setting the
- environment variable ``CTEST_PARALLEL_LEVEL``.
+ :envvar:`CTEST_PARALLEL_LEVEL` environment variable.
This option can be used with the :prop_test:`PROCESSORS` test property.
@@ -867,7 +880,7 @@ Configuration settings include:
* `CTest Script`_ variable: :variable:`CTEST_CONFIGURATION_TYPE`
* :module:`CTest` module variable: ``DEFAULT_CTEST_CONFIGURATION_TYPE``,
- initialized by the ``CMAKE_CONFIG_TYPE`` environment variable
+ initialized by the :envvar:`CMAKE_CONFIG_TYPE` environment variable
``LabelsForSubprojects``
Specify a semicolon-separated list of labels that will be treated as
diff --git a/Help/policy/CMP0077.rst b/Help/policy/CMP0077.rst
index 8efe198901..44797b648b 100644
--- a/Help/policy/CMP0077.rst
+++ b/Help/policy/CMP0077.rst
@@ -3,10 +3,46 @@ CMP0077
:command:`option` honors normal variables.
-The ``OLD`` behavior for this policy is to clear any existing normal variables
-with the same name. The ``NEW`` behavior for this policy is to not create
-a cache entry or modify any existing normal variables if a normal variable
-with the same name already exists.
+The :command:`option` command is typically used to create a cache entry
+to allow users to set the option. However, there are cases in which a
+normal (non-cached) variable of the same name as the option may be
+defined by the project prior to calling the :command:`option` command.
+For example, a project that embeds another project as a subdirectory
+may want to hard-code options of the subproject to build the way it needs.
+
+For historical reasons in CMake 3.12 and below the :command:`option`
+command *removes* a normal (non-cached) variable of the same name when:
+
+* a cache entry of the specified name does not exist at all, or
+* a cache entry of the specified name exists but has not been given
+ a type (e.g. via ``-D<name>=ON`` on the command line).
+
+In both of these cases (typically on the first run in a new build tree),
+the :command:`option` command gives the cache entry type ``BOOL`` and
+removes any normal (non-cached) variable of the same name. In the
+remaining case that the cache entry of the specified name already
+exists and has a type (typically on later runs in a build tree), the
+:command:`option` command changes nothing and any normal variable of
+the same name remains set.
+
+In CMake 3.13 and above the :command:`option` command prefers to
+do nothing when a normal variable of the given name already exists.
+It does not create or update a cache entry or remove the normal variable.
+The new behavior is consistent between the first and later runs in a
+build tree. This policy provides compatibility with projects that have
+not been updated to expect the new behavior.
+
+When the :command:`option` command sees a normal variable of the given
+name:
+
+* The ``OLD`` behavior for this policy is to proceed even when a normal
+ variable of the same name exists. If the cache entry does not already
+ exist and have a type then it is created and/or given a type and the
+ normal variable is removed.
+
+* The ``NEW`` behavior for this policy is to do nothing when a normal
+ variable of the same name exists. The normal variable is not removed.
+ The cache entry is not created or updated and is ignored if it exists.
This policy was introduced in CMake version 3.13. CMake version
|release| warns when the policy is not set and uses ``OLD`` behavior.
diff --git a/Help/release/3.13.rst b/Help/release/3.13.rst
index b08f21dff5..b993775a3d 100644
--- a/Help/release/3.13.rst
+++ b/Help/release/3.13.rst
@@ -20,7 +20,7 @@ Generators
* The :generator:`Xcode` generator learned to configure more Xcode Scheme
fields. See the :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable.
-* The :generator:`Green Hills MULTI` generator has been udpated:
+* The :generator:`Green Hills MULTI` generator has been updated:
- Added support for architecture selection through
:variable:`CMAKE_GENERATOR_PLATFORM`:
@@ -157,6 +157,10 @@ Modules
* The :module:`FindPkgConfig` module gained an option to create imported
targets in global scope.
+* The :module:`FindPkgConfig` module gained support for ``<`` and ``>``
+ operators for version checks in addition to the already supported
+ operators ``>=``, ``<=``, and ``=``.
+
* Modules :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython`
gain capability to control order of resource lookup on macOS (Framework) and
Windows (Registry).
@@ -203,8 +207,10 @@ Deprecated and Removed Features
Other Changes
=============
-* The :command:`option` command now honors existing normal variables instead
- of replacing them with a cache entry. See policy :policy:`CMP0077`.
+* The :command:`option` command now honors an existing normal variable
+ of the same name and does nothing instead of possibly creating a cache
+ entry (or setting its type) and removing the normal variable.
+ See policy :policy:`CMP0077`.
* The :ref:`Makefile Generators` learned to remove custom command and
custom target byproducts during ``make clean``.
diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst
deleted file mode 100644
index e4cc01e23f..0000000000
--- a/Help/release/dev/0-sample-topic.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-0-sample-topic
---------------
-
-* This is a sample release note for the change in a topic.
- Developers should add similar notes for each topic branch
- making a noteworthy change. Each document should be named
- and titled to match the topic name to avoid merge conflicts.
diff --git a/Help/release/index.rst b/Help/release/index.rst
index 7ef3a8ed73..fbe4cf6256 100644
--- a/Help/release/index.rst
+++ b/Help/release/index.rst
@@ -7,8 +7,6 @@ CMake Release Notes
This file should include the adjacent "dev.txt" file
in development versions but not in release versions.
-.. include:: dev.txt
-
Releases
========
diff --git a/Help/variable/CMAKE_OSX_VARIABLE.txt b/Help/variable/CMAKE_OSX_VARIABLE.txt
index 5b84726048..16f3c1a1a8 100644
--- a/Help/variable/CMAKE_OSX_VARIABLE.txt
+++ b/Help/variable/CMAKE_OSX_VARIABLE.txt
@@ -2,6 +2,8 @@ The value of this variable should be set prior to the first
:command:`project` or :command:`enable_language` command invocation
because it may influence configuration of the toolchain and flags.
It is intended to be set locally by the user creating a build tree.
+This variable should be set as a ``CACHE`` entry (or else CMake may
+remove it while initializing a cache entry of the same name).
Despite the ``OSX`` part in the variable name(s) they apply also to
other SDKs than macOS like iOS, tvOS, or watchOS.
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index 1653b55f04..e23470b144 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -33,6 +33,14 @@ else()
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Xlinker" " ")
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP)
+ if(CMAKE_${lang}_COMPILER_TARGET)
+ if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4.0)
+ list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-target" "${CMAKE_${lang}_COMPILER_TARGET}")
+ else()
+ list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
+ endif()
+ endif()
+
set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 39b9b74c17..e955bc2f4f 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -53,8 +53,10 @@
# * SGIMATH
# * IBMESSL
# * Intel10_32 (intel mkl v10 32 bit)
-# * Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model)
-# * Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)
+# * Intel10_64lp (intel mkl v10+ 64 bit, threaded code, lp64 model)
+# * Intel10_64lp_seq (intel mkl v10+ 64 bit, sequential code, lp64 model)
+# * Intel10_64ilp (intel mkl v10+ 64 bit, threaded code, ilp64 model)
+# * Intel10_64ilp_seq (intel mkl v10+ 64 bit, sequential code, ilp64 model)
# * Intel (older versions of mkl 32 and 64 bit)
# * ACML
# * ACML_MP
@@ -199,9 +201,14 @@ if (BLA_VENDOR STREQUAL "All")
endif()
endif ()
-#BLAS in intel mkl 10 library? (em64t 64bit)
+#BLAS in intel mkl 10+ library? (em64t 64bit)
if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
if (NOT BLAS_LIBRARIES)
+ if (BLA_VENDOR MATCHES "_64ilp")
+ set(BLAS_mkl_ILP_MODE "ilp64")
+ else ()
+ set(BLAS_mkl_ILP_MODE "lp64")
+ endif ()
if (NOT WIN32)
set(LM "-lm")
endif ()
@@ -230,9 +237,9 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
"mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}")
endif()
- if (BLA_VENDOR MATCHES "^Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
+ if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
- "mkl_blas95_lp64${BLAS_mkl_DLL_SUFFIX} mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}")
+ "mkl_blas95_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX} mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}")
endif ()
# Add threading/sequential libs
@@ -262,23 +269,23 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
"mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide")
endif ()
- if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
+ if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All")
# old version
list(APPEND BLAS_SEARCH_LIBS
- "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide")
+ "mkl_blas95 mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core guide")
# mkl >= 10.3
if (CMAKE_C_COMPILER MATCHES ".+gcc")
list(APPEND BLAS_SEARCH_LIBS
- "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core gomp")
+ "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_gnu_thread mkl_core gomp")
else ()
list(APPEND BLAS_SEARCH_LIBS
- "mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
+ "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core iomp5")
endif ()
endif ()
- if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
+ if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
- "mkl_intel_lp64 mkl_sequential mkl_core")
+ "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core")
endif ()
endif ()
else ()
@@ -297,9 +304,9 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
"mkl_intel_c${BLAS_mkl_DLL_SUFFIX}")
endif()
- if (BLA_VENDOR MATCHES "^Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
+ if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
- "mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}")
+ "mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}")
endif ()
# Add threading/sequential libs
@@ -329,24 +336,24 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
"mkl_intel mkl_intel_thread mkl_core guide")
endif ()
- if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
+ if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All")
# old version
list(APPEND BLAS_SEARCH_LIBS
- "mkl_intel_lp64 mkl_intel_thread mkl_core guide")
+ "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core guide")
# mkl >= 10.3
if (CMAKE_C_COMPILER MATCHES ".+gcc")
list(APPEND BLAS_SEARCH_LIBS
- "mkl_intel_lp64 mkl_gnu_thread mkl_core gomp")
+ "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_gnu_thread mkl_core gomp")
else ()
list(APPEND BLAS_SEARCH_LIBS
- "mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
+ "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core iomp5")
endif ()
endif ()
- if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
+ if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
- "mkl_intel_lp64 mkl_sequential mkl_core")
+ "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core")
endif ()
#older vesions of intel mkl libs
@@ -376,6 +383,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
endforeach ()
endif ()
+ unset(BLAS_mkl_ILP_MODE)
endif ()
endif ()
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index a3c87f81eb..7ca9950e5e 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -278,6 +278,12 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
find_package(Threads REQUIRED)
endif()
+ if (BLA_VENDOR MATCHES "_64ilp")
+ set(BLAS_mkl_ILP_MODE "ilp64")
+ else ()
+ set(BLAS_mkl_ILP_MODE "lp64")
+ endif ()
+
set(LAPACK_SEARCH_LIBS "")
if (BLA_F95)
@@ -292,7 +298,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
list(APPEND LAPACK_SEARCH_LIBS
"mkl_intel_c")
list(APPEND LAPACK_SEARCH_LIBS
- "mkl_intel_lp64")
+ "mkl_intel_${BLAS_mkl_ILP_MODE}")
else()
set(LAPACK_mkl_SEARCH_SYMBOL "cheev")
set(_LIBRARIES LAPACK_LIBRARIES)
@@ -303,7 +309,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
"mkl_lapack")
# new >= 10.3
list(APPEND LAPACK_SEARCH_LIBS
- "mkl_gf_lp64")
+ "mkl_gf_${BLAS_mkl_ILP_MODE}")
endif()
# First try empty lapack libs
@@ -332,6 +338,8 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
)
endif ()
endforeach ()
+
+ unset(BLAS_mkl_ILP_MODE)
endif ()
endif()
else()
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 3934867b85..a96df997ef 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -397,7 +397,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
set(_pkg_check_modules_exist_query)
# check whether version is given
- if (_pkg_check_modules_pkg MATCHES "(.*[^><])(>=|=|<=)(.*)")
+ if (_pkg_check_modules_pkg MATCHES "(.*[^><])(=|[><]=?)(.*)")
set(_pkg_check_modules_pkg_name "${CMAKE_MATCH_1}")
set(_pkg_check_modules_pkg_op "${CMAKE_MATCH_2}")
set(_pkg_check_modules_pkg_ver "${CMAKE_MATCH_3}")
@@ -415,9 +415,11 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
list(APPEND _pkg_check_modules_packages "${_pkg_check_modules_pkg_name}")
# create the final query which is of the format:
+ # * <pkg-name> > <version>
# * <pkg-name> >= <version>
# * <pkg-name> = <version>
# * <pkg-name> <= <version>
+ # * <pkg-name> < <version>
# * --exists <pkg-name>
list(APPEND _pkg_check_modules_exist_query --print-errors --short-errors)
if (_pkg_check_modules_pkg_op)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 36dd0a0e30..4ecba054f2 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -362,7 +362,7 @@ if(MSVC)
)
endif()
- # include the language dll's for vs8 as well as the actuall dll's
+ # include the language dll's for vs8 as well as the actual dll's
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
@@ -406,7 +406,7 @@ if(MSVC)
)
endif()
- # include the language dll's for vs9 as well as the actuall dll's
+ # include the language dll's for vs9 as well as the actual dll's
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
@@ -487,7 +487,7 @@ if(MSVC)
endif()
endif()
- # include the language dll's as well as the actuall dll's
+ # include the language dll's as well as the actual dll's
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFCLOC")
set(__install__libs ${__install__libs}
"${MSVC_MFCLOC_DIR}/mfc${v}chs.dll"
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake
index 3bd5147ba0..2de71ee207 100644
--- a/Modules/Internal/CPack/CPackRPM.cmake
+++ b/Modules/Internal/CPack/CPackRPM.cmake
@@ -491,7 +491,7 @@ function(cpack_rpm_prepare_install_files INSTALL_FILES_LIST WDIR PACKAGE_PREFIXE
list(LENGTH SYMLINK_RELOCATIONS SYMLINK_RELOCATIONS_COUNT)
list(LENGTH POINT_RELOCATIONS POINT_RELOCATIONS_COUNT)
else()
- # location pointed to is ouside WDR so it should be treated as a permanent symlink
+ # location pointed to is outside WDR so it should be treated as a permanent symlink
set(SYMLINK_POINT_WD_ "${SYMLINK_POINT_}")
unset(SYMLINK_RELOCATIONS)
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index 9001888da1..f75ae7836f 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -847,7 +847,7 @@ Section "Uninstall"
@CPACK_NSIS_DELETE_ICONS@
@CPACK_NSIS_DELETE_ICONS_EXTRA@
- ;Delete empty start menu parent diretories
+ ;Delete empty start menu parent directories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
@@ -866,7 +866,7 @@ Section "Uninstall"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
@CPACK_NSIS_DELETE_ICONS_EXTRA@
- ;Delete empty start menu parent diretories
+ ;Delete empty start menu parent directories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
secondStartMenuDeleteLoop:
diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake
index f739ab1ef7..9ed1e01f95 100644
--- a/Modules/Platform/Android-Clang.cmake
+++ b/Modules/Platform/Android-Clang.cmake
@@ -40,5 +40,6 @@ macro(__android_compiler_clang lang)
endif()
if(NOT CMAKE_${lang}_COMPILER_TARGET)
set(CMAKE_${lang}_COMPILER_TARGET "${_ANDROID_ABI_CLANG_TARGET}")
+ list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
endif()
endmacro()
diff --git a/Modules/Platform/GNU.cmake b/Modules/Platform/GNU.cmake
index e8c3b657b6..fac29a8fa4 100644
--- a/Modules/Platform/GNU.cmake
+++ b/Modules/Platform/GNU.cmake
@@ -8,6 +8,33 @@ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+# Debian policy requires that shared libraries be installed without
+# executable permission. Fedora policy requires that shared libraries
+# be installed with the executable permission. Since the native tools
+# create shared libraries with execute permission in the first place a
+# reasonable policy seems to be to install with execute permission by
+# default. In order to support debian packages we provide an option
+# here. The option default is based on the current distribution, but
+# packagers can set it explicitly on the command line.
+if(DEFINED CMAKE_INSTALL_SO_NO_EXE)
+ # Store the decision variable in the cache. This preserves any
+ # setting the user provides on the command line.
+ set(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL
+ "Install .so files without execute permission.")
+else()
+ # Store the decision variable as an internal cache entry to avoid
+ # checking the platform every time. This option is advanced enough
+ # that only package maintainers should need to adjust it. They are
+ # capable of providing a setting on the command line.
+ if(EXISTS "/etc/debian_version")
+ set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
+ "Install .so files without execute permission.")
+ else()
+ set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL
+ "Install .so files without execute permission.")
+ endif()
+endif()
+
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-gnu[a-z0-9_]*")
include(Platform/UnixPaths)
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index dc4febc64f..f20a53b798 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -500,6 +500,10 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
get_property (compile_options SOURCE "${infile}" PROPERTY GENERATED_COMPILE_OPTIONS)
set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY COMPILE_OPTIONS $<TARGET_GENEX_EVAL:${target_name},$<TARGET_PROPERTY:${target_name},SWIG_GENERATED_COMPILE_OPTIONS>> ${compile_options})
+ if (SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG MATCHES "php")
+ set_property (SOURCE "${swig_generated_file_fullname}" APPEND PROPERTY INCLUDE_DIRECTORIES "${outdir}")
+ endif()
+
set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files} PARENT_SCOPE)
# legacy support
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 129c6fb562..626dbb8a36 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
-set(CMake_VERSION_MINOR 12)
-set(CMake_VERSION_PATCH 20181003)
-#set(CMake_VERSION_RC 1)
+set(CMake_VERSION_MINOR 13)
+set(CMake_VERSION_PATCH 0)
+set(CMake_VERSION_RC 1)
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 6b62bb4f99..a87473d333 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -563,7 +563,7 @@ int cmCTestScriptHandler::RunCurrentScript()
// now that we have done most of the error checking finally run the
// dashboard, we may be asked to repeatedly run this dashboard, such as
- // for a continuous, do we ned to run it more than once?
+ // for a continuous, do we need to run it more than once?
if (this->ContinuousDuration >= 0) {
this->UpdateElapsedTime();
auto ending_time =
diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx
index 822363d2d7..83dde3f75f 100644
--- a/Source/CTest/cmParseGTMCoverage.cxx
+++ b/Source/CTest/cmParseGTMCoverage.cxx
@@ -160,7 +160,7 @@ bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line,
{
// this method parses lines from the .mcov file
// each line has ^COVERAGE(...) in it, and there
- // are several varients of coverage lines:
+ // are several variants of coverage lines:
//
// ^COVERAGE("DIC11","PR1",0)="2:0:0:0"
// ( file , entry, line ) = "number_executed:timing_info"
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 305c7a64b8..8f565c815d 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -300,19 +300,15 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
}
}
- if (haveDescription) {
- this->Makefile->AddDefinition("PROJECT_DESCRIPTION", description.c_str());
- this->Makefile->AddDefinition(projectName + "_DESCRIPTION",
- description.c_str());
- TopLevelCMakeVarCondSet("CMAKE_PROJECT_DESCRIPTION", description.c_str());
- }
+ this->Makefile->AddDefinition("PROJECT_DESCRIPTION", description.c_str());
+ this->Makefile->AddDefinition(projectName + "_DESCRIPTION",
+ description.c_str());
+ TopLevelCMakeVarCondSet("CMAKE_PROJECT_DESCRIPTION", description.c_str());
- if (haveHomepage) {
- this->Makefile->AddDefinition("PROJECT_HOMEPAGE_URL", homepage.c_str());
- this->Makefile->AddDefinition(projectName + "_HOMEPAGE_URL",
- homepage.c_str());
- TopLevelCMakeVarCondSet("CMAKE_PROJECT_HOMEPAGE_URL", homepage.c_str());
- }
+ this->Makefile->AddDefinition("PROJECT_HOMEPAGE_URL", homepage.c_str());
+ this->Makefile->AddDefinition(projectName + "_HOMEPAGE_URL",
+ homepage.c_str());
+ TopLevelCMakeVarCondSet("CMAKE_PROJECT_HOMEPAGE_URL", homepage.c_str());
if (languages.empty()) {
// if no language is specified do c and c++
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 8339aacb13..d05d660386 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2826,11 +2826,11 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
// contain the location of the linker map, however on MIPS the
// .dynamic section is always read-only so this is not possible. MIPS
// objects instead contain a DT_MIPS_RLD_MAP tag which contains the
- // address where the dyanmic linker will write to (an indirect
+ // address where the dynamic linker will write to (an indirect
// version of DT_DEBUG). Since this doesn't work when using PIE, a
// relative equivalent was created - DT_MIPS_RLD_MAP_REL. Since this
// version contains a relative offset, moving it changes the
- // calculated address. This may cause the dyanmic linker to write
+ // calculated address. This may cause the dynamic linker to write
// into memory it should not be changing.
//
// To fix this, we adjust the value of DT_MIPS_RLD_MAP_REL here. If
diff --git a/Source/cmVS141CLFlagTable.h b/Source/cmVS141CLFlagTable.h
index 7d3e35602e..2a9944aab7 100644
--- a/Source/cmVS141CLFlagTable.h
+++ b/Source/cmVS141CLFlagTable.h
@@ -83,6 +83,8 @@ static cmVS7FlagTable cmVS141CLFlagTable[] = {
{ "FloatingPointModel", "fp:strict", "Strict", "Strict", 0 },
{ "FloatingPointModel", "fp:fast", "Fast", "Fast", 0 },
+ { "SpectreMitigation", "Qspectre", "Spectre mitigations", "Spectre", 0 },
+
{ "LanguageStandard", "std:c++17", "ISO C++17 Standard", "stdcpp17", 0 },
{ "LanguageStandard", "std:c++14", "ISO C++14 Standard", "stdcpp14", 0 },
{ "LanguageStandard", "std:c++latest", "ISO C++ Latest Draft Standard",
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 16eca961c1..57d66e0e5c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1125,6 +1125,9 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues(
if (this->IPOEnabledConfigurations.count(config) > 0) {
e1.Element("WholeProgramOptimization", "true");
}
+ if (this->SpectreMitigationConfigurations.count(config) > 0) {
+ e1.Element("SpectreMitigation", "Spectre");
+ }
}
void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValuesManaged(
@@ -2625,6 +2628,11 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
}
}
+ if (clOptions.HasFlag("SpectreMitigation")) {
+ this->SpectreMitigationConfigurations.insert(configName);
+ clOptions.RemoveFlag("SpectreMitigation");
+ }
+
this->ClOptions[configName] = std::move(pOptions);
return true;
}
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 829d2bfb12..0dc03b6556 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -205,6 +205,7 @@ private:
unsigned int NsightTegraVersion[4];
bool TargetCompileAsWinRT;
std::set<std::string> IPOEnabledConfigurations;
+ std::set<std::string> SpectreMitigationConfigurations;
cmGlobalVisualStudio10Generator* const GlobalGenerator;
cmLocalVisualStudio10Generator* const LocalGenerator;
std::set<std::string> CSharpCustomCommandNames;
diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx
index 0dfa326a31..623ad28d96 100644
--- a/Tests/CMakeLib/testSystemTools.cxx
+++ b/Tests/CMakeLib/testSystemTools.cxx
@@ -52,7 +52,7 @@ int testSystemTools(int /*unused*/, char* /*unused*/ [])
cmAssert(cmSystemTools::strverscmp("99999999999999", "99999999999991") > 0,
"strverscmp natural overflow");
cmAssert(cmSystemTools::strverscmp("00000000000009", "00000000000001") > 0,
- "strverscmp deciaml precision");
+ "strverscmp decimal precision");
cmAssert(cmSystemTools::strverscmp("a.b.c.0", "a.b.c.000") > 0,
"strverscmp multiple zeros");
cmAssert(cmSystemTools::strverscmp("lib_1.2_10", "lib_1.2_2") > 0,
diff --git a/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt b/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt
index b1c4fc32fc..1ad6238dff 100644
--- a/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt
+++ b/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC_RELAXED_MODE TRUE)
set(MOC_INCLUDE_NAME "mocIncludeRelaxed")
include(${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/shared.cmake)
-# Relaxed ony executable
+# Relaxed only executable
add_executable(mocIncludeRelaxedOnly
RObjA.cpp
RObjB.cpp
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake
new file mode 100644
index 0000000000..2a505c6a57
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake
@@ -0,0 +1,83 @@
+cmake_minimum_required(VERSION 3.12)
+
+project(FindPkgConfig_IMPORTED_TARGET C)
+
+find_package(PkgConfig REQUIRED)
+
+message(STATUS "source: ${CMAKE_CURRENT_SOURCE_DIR} bin ${CMAKE_CURRENT_BINARY_DIR}")
+
+# Setup for the remaining package tests below
+set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH)
+set(fakePkgDir ${CMAKE_CURRENT_BINARY_DIR}/pc-fakepackage)
+file(WRITE ${fakePkgDir}/lib/libcmakeinternalfakepackage.a "")
+file(WRITE ${fakePkgDir}/lib/cmakeinternalfakepackage.lib "")
+file(WRITE ${fakePkgDir}/lib/pkgconfig/cmakeinternalfakepackage.pc
+"Name: CMakeInternalFakePackage
+Description: Dummy package for FindPkgConfig VERSION_OPERATORS test
+Version: 8.9
+Libs: -lcmakeinternalfakepackage
+")
+
+# Always find the .pc file in the calls further below so that we can test that
+# the import target find_library() calls handle the NO...PATH options correctly
+set(ENV{PKG_CONFIG_PATH} ${fakePkgDir}/lib/pkgconfig)
+
+pkg_check_modules(FakePackageGE REQUIRED QUIET "cmakeinternalfakepackage >= 8")
+if (NOT FakePackageGE_FOUND)
+ message(FATAL_ERROR "fake package >= 8 not found")
+endif()
+
+pkg_check_modules(FakePackageGE_FAIL QUIET "cmakeinternalfakepackage >= 8.10")
+if (FakePackageGE_FAIL_FOUND)
+ message(FATAL_ERROR "fake package >= 8.10 found")
+endif()
+
+pkg_check_modules(FakePackageLE REQUIRED QUIET "cmakeinternalfakepackage<=9")
+if (NOT FakePackageLE_FOUND)
+ message(FATAL_ERROR "fake package <= 9 not found")
+endif()
+
+pkg_check_modules(FakePackageLE_FAIL QUIET "cmakeinternalfakepackage <= 8.1")
+if (FakePackageLE_FAIL_FOUND)
+ message(FATAL_ERROR "fake package <= 8.1 found")
+endif()
+
+pkg_check_modules(FakePackageGT REQUIRED QUIET "cmakeinternalfakepackage > 8")
+if (NOT FakePackageGT_FOUND)
+ message(FATAL_ERROR "fake package > 8 not found")
+endif()
+
+pkg_check_modules(FakePackageGT_FAIL QUIET "cmakeinternalfakepackage > 8.9")
+if (FakePackageGT_FAIL_FOUND)
+ message(FATAL_ERROR "fake package > 8.9 found")
+endif()
+
+pkg_check_modules(FakePackageLT REQUIRED QUIET "cmakeinternalfakepackage<9")
+if (NOT FakePackageLT_FOUND)
+ message(FATAL_ERROR "fake package < 9 not found")
+endif()
+
+pkg_check_modules(FakePackageLT_FAIL QUIET "cmakeinternalfakepackage < 8.9")
+if (FakePackageLT_FAIL_FOUND)
+ message(FATAL_ERROR "fake package < 8.9 found")
+endif()
+
+pkg_check_modules(FakePackageEQ REQUIRED QUIET "cmakeinternalfakepackage=8.9")
+if (NOT FakePackageEQ_FOUND)
+ message(FATAL_ERROR "fake package = 8.9 not found")
+endif()
+
+pkg_check_modules(FakePackageEQ_FAIL QUIET "cmakeinternalfakepackage = 8.8")
+if (FakePackageEQ_FAIL_FOUND)
+ message(FATAL_ERROR "fake package = 8.8 found")
+endif()
+
+pkg_check_modules(FakePackageEQ_INV QUIET "cmakeinternalfakepackage == 8.9")
+if (FakePackageEQ_FAIL_FOUND)
+ message(FATAL_ERROR "fake package == 8.9 found")
+endif()
+
+pkg_check_modules(FakePackageLLT_INV QUIET "cmakeinternalfakepackage <<= 9")
+if (FakePackageLLT_FAIL_FOUND)
+ message(FATAL_ERROR "fake package <<= 9 found")
+endif()
diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
index e12b52fe48..671ff518b5 100644
--- a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
@@ -16,4 +16,5 @@ if (PKG_CONFIG_FOUND)
run_cmake(FindPkgConfig_GET_VARIABLE)
run_cmake(FindPkgConfig_cache_variables)
run_cmake(FindPkgConfig_IMPORTED_TARGET)
+ run_cmake(FindPkgConfig_VERSION_OPERATORS)
endif ()
diff --git a/Tests/RunCMake/project/ProjectTwice.cmake b/Tests/RunCMake/project/ProjectTwice.cmake
new file mode 100644
index 0000000000..d053834dc4
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectTwice.cmake
@@ -0,0 +1,26 @@
+cmake_policy(SET CMP0048 NEW)
+project(ProjectTwiceTestFirst
+ VERSION 1.2.3.4
+ DESCRIPTION "Test Project"
+ HOMEPAGE_URL "http://example.com"
+ LANGUAGES NONE
+)
+
+project(ProjectTwiceTestSecond LANGUAGES NONE)
+
+foreach(var
+ PROJECT_VERSION
+ PROJECT_VERSION_MAJOR
+ PROJECT_VERSION_MINOR
+ PROJECT_VERSION_PATCH
+ PROJECT_VERSION_TWEAK
+ PROJECT_DESCRIPTION
+ PROJECT_HOMEPAGE_URL
+)
+ if(${var})
+ message(SEND_ERROR "${var} set but should be empty")
+ endif()
+ if(CMAKE_${var})
+ message(SEND_ERROR "CMAKE_${var} set but should be empty")
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake
index e9fb929ffb..3a8ad4bbf0 100644
--- a/Tests/RunCMake/project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/project/RunCMakeTest.cmake
@@ -15,6 +15,7 @@ run_cmake(ProjectDescriptionNoArg2)
run_cmake(ProjectHomepage)
run_cmake(ProjectHomepage2)
run_cmake(ProjectHomepageNoArg)
+run_cmake(ProjectTwice)
run_cmake(VersionAndLanguagesEmpty)
run_cmake(VersionEmpty)
run_cmake(VersionInvalid)
diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake
index 1edcd65b11..bbc74379dc 100644
--- a/Utilities/Release/upload_release.cmake
+++ b/Utilities/Release/upload_release.cmake
@@ -1,6 +1,6 @@
set(CTEST_RUN_CURRENT_SCRIPT 0)
if(NOT VERSION)
- set(VERSION 3.12)
+ set(VERSION 3.13)
endif()
if(NOT DEFINED PROJECT_PREFIX)
set(PROJECT_PREFIX cmake-${VERSION})