summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/FIND_XXX.txt2
-rw-r--r--Help/command/add_library.rst2
-rw-r--r--Help/command/find_package.rst2
-rw-r--r--Help/command/install.rst10
-rw-r--r--Help/command/set_directory_properties.rst7
-rw-r--r--Help/cpack_gen/bundle.rst24
-rw-r--r--Help/cpack_gen/dmg.rst38
-rw-r--r--Help/cpack_gen/ifw.rst4
-rw-r--r--Help/cpack_gen/packagemaker.rst18
-rw-r--r--Help/cpack_gen/productbuild.rst16
-rw-r--r--Help/envvar/CMAKE_OSX_ARCHITECTURES.rst2
-rw-r--r--Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst2
-rw-r--r--Help/manual/cmake-buildsystem.7.rst2
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/prop_dir/INCLUDE_DIRECTORIES.rst12
-rw-r--r--Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst14
-rw-r--r--Help/prop_tgt/BUNDLE.rst2
-rw-r--r--Help/prop_tgt/BUNDLE_EXTENSION.rst2
-rw-r--r--Help/prop_tgt/ENABLE_EXPORTS.rst2
-rw-r--r--Help/prop_tgt/FRAMEWORK.rst6
-rw-r--r--Help/prop_tgt/FRAMEWORK_VERSION.rst2
-rw-r--r--Help/prop_tgt/IMPORTED_LOCATION.rst4
-rw-r--r--Help/prop_tgt/MACOSX_BUNDLE.rst4
-rw-r--r--Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst4
-rw-r--r--Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst4
-rw-r--r--Help/prop_tgt/MACOSX_RPATH.rst2
-rw-r--r--Help/prop_tgt/OSX_ARCHITECTURES.rst4
-rw-r--r--Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst2
-rw-r--r--Help/prop_tgt/PRIVATE_HEADER.rst2
-rw-r--r--Help/prop_tgt/PUBLIC_HEADER.rst2
-rw-r--r--Help/prop_tgt/RESOURCE.rst6
-rw-r--r--Help/prop_tgt/SOVERSION.rst2
-rw-r--r--Help/prop_tgt/VERSION.rst2
-rw-r--r--Help/variable/CMAKE_APPBUNDLE_PATH.rst2
-rw-r--r--Help/variable/CMAKE_CPACK_COMMAND.rst8
-rw-r--r--Help/variable/CMAKE_ENABLE_EXPORTS.rst2
-rw-r--r--Help/variable/CMAKE_FIND_APPBUNDLE.rst4
-rw-r--r--Help/variable/CMAKE_FIND_FRAMEWORK.rst4
-rw-r--r--Help/variable/CMAKE_FRAMEWORK_PATH.rst2
-rw-r--r--Help/variable/CMAKE_HOST_APPLE.rst4
-rw-r--r--Help/variable/CMAKE_HOST_SYSTEM_NAME.rst2
-rw-r--r--Help/variable/CMAKE_INSTALL_NAME_DIR.rst2
-rw-r--r--Help/variable/CMAKE_MACOSX_RPATH.rst2
-rw-r--r--Help/variable/CMAKE_OSX_ARCHITECTURES.rst2
-rw-r--r--Help/variable/CMAKE_OSX_SYSROOT.rst2
-rw-r--r--Help/variable/CMAKE_SYSTEM_APPBUNDLE_PATH.rst2
-rw-r--r--Help/variable/CMAKE_SYSTEM_FRAMEWORK_PATH.rst2
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake3
-rw-r--r--Modules/CMakeIOSInstallCombined.cmake9
-rw-r--r--Modules/CPack.cmake2
-rw-r--r--Modules/CPackComponent.cmake6
-rw-r--r--Modules/CSharpUtilities.cmake5
-rw-r--r--Modules/Compiler/IAR-ASM.cmake2
-rw-r--r--Modules/Compiler/IAR-C.cmake6
-rw-r--r--Modules/Compiler/IAR-CXX.cmake6
-rw-r--r--Modules/FindBoost.cmake6
-rw-r--r--Modules/FindDoxygen.cmake5
-rw-r--r--Modules/GoogleTest.cmake2
-rw-r--r--Modules/Internal/CPack/CPackDeb.cmake5
-rw-r--r--Modules/Internal/CPack/CPackRPM.cmake5
-rw-r--r--Modules/Platform/Android-Determine.cmake5
-rw-r--r--Modules/ProcessorCount.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackGenerator.cxx4
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx49
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.h5
-rw-r--r--Source/CTest/cmCTestRunTest.cxx5
-rw-r--r--Source/CTest/cmCTestRunTest.h3
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx2
-rw-r--r--Source/QtDialog/QCMake.cxx4
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx2
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx7
-rw-r--r--Source/cmComputeLinkInformation.cxx2
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx6
-rw-r--r--Source/cmGlobalGenerator.cxx14
-rw-r--r--Source/cmLocalGenerator.cxx2
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmLocalNinjaGenerator.cxx7
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx4
-rw-r--r--Source/cmMakefile.cxx30
-rw-r--r--Source/cmMakefileTargetGenerator.h4
-rw-r--r--Source/cmNinjaTargetGenerator.h2
-rw-r--r--Source/cmServerProtocol.cxx8
-rw-r--r--Source/cmState.cxx6
-rw-r--r--Source/cmState.h2
-rw-r--r--Source/cmake.cxx54
-rw-r--r--Tests/GoogleTest/Test/CMakeLists.txt7
-rw-r--r--Tests/GoogleTest/Test/empty.cxx0
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake9
89 files changed, 319 insertions, 242 deletions
diff --git a/Help/command/FIND_XXX.txt b/Help/command/FIND_XXX.txt
index 38c231a..73dbd57 100644
--- a/Help/command/FIND_XXX.txt
+++ b/Help/command/FIND_XXX.txt
@@ -137,7 +137,7 @@ If ``NO_DEFAULT_PATH`` is not specified, the search process is as follows:
.. |FIND_ARGS_XXX| replace:: <VAR> NAMES name
-On OS X the :variable:`CMAKE_FIND_FRAMEWORK` and
+On macOS the :variable:`CMAKE_FIND_FRAMEWORK` and
:variable:`CMAKE_FIND_APPBUNDLE` variables determine the order of
preference between Apple-style and unix-style package components.
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index b7ba724..c4c512c 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -35,7 +35,7 @@ variable :variable:`BUILD_SHARED_LIBS` is ``ON``. For ``SHARED`` and
``MODULE`` libraries the :prop_tgt:`POSITION_INDEPENDENT_CODE` target
property is set to ``ON`` automatically.
A ``SHARED`` or ``STATIC`` library may be marked with the :prop_tgt:`FRAMEWORK`
-target property to create an OS X Framework.
+target property to create an macOS Framework.
If a library does not export any symbols, it must not be declared as a
``SHARED`` library. For example, a Windows resource DLL or a managed C++/CLI
diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst
index bbe8c4d..b486b79 100644
--- a/Help/command/find_package.rst
+++ b/Help/command/find_package.rst
@@ -216,7 +216,7 @@ Each entry is meant for installation trees following Windows (W), UNIX
<prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/ (W/U)
<prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/(cmake|CMake)/ (W/U)
-On systems supporting OS X Frameworks and Application Bundles the
+On systems supporting macOS Frameworks and Application Bundles the
following directories are searched for frameworks or bundles
containing a configuration file::
diff --git a/Help/command/install.rst b/Help/command/install.rst
index 8b2a971..3a2b4da 100644
--- a/Help/command/install.rst
+++ b/Help/command/install.rst
@@ -115,19 +115,19 @@ project. There are several kinds of target files that may be installed:
``ARCHIVE``
Static libraries are treated as ``ARCHIVE`` targets, except those
- marked with the ``FRAMEWORK`` property on OS X (see ``FRAMEWORK``
+ marked with the ``FRAMEWORK`` property on macOS (see ``FRAMEWORK``
below.) For DLL platforms (all Windows-based systems including
Cygwin), the DLL import library is treated as an ``ARCHIVE`` target.
``LIBRARY``
Module libraries are always treated as ``LIBRARY`` targets. For non-
DLL platforms shared libraries are treated as ``LIBRARY`` targets,
- except those marked with the ``FRAMEWORK`` property on OS X (see
+ except those marked with the ``FRAMEWORK`` property on macOS (see
``FRAMEWORK`` below.)
``RUNTIME``
Executables are treated as ``RUNTIME`` objects, except those marked
- with the ``MACOSX_BUNDLE`` property on OS X (see ``BUNDLE`` below.)
+ with the ``MACOSX_BUNDLE`` property on macOS (see ``BUNDLE`` below.)
For DLL platforms (all Windows-based systems including Cygwin), the
DLL part of a shared library is treated as a ``RUNTIME`` target.
@@ -137,11 +137,11 @@ project. There are several kinds of target files that may be installed:
``FRAMEWORK``
Both static and shared libraries marked with the ``FRAMEWORK``
- property are treated as ``FRAMEWORK`` targets on OS X.
+ property are treated as ``FRAMEWORK`` targets on macOS.
``BUNDLE``
Executables marked with the ``MACOSX_BUNDLE`` property are treated as
- ``BUNDLE`` targets on OS X.
+ ``BUNDLE`` targets on macOS.
``PUBLIC_HEADER``
Any ``PUBLIC_HEADER`` files associated with a library are installed in
diff --git a/Help/command/set_directory_properties.rst b/Help/command/set_directory_properties.rst
index e485fce..42e7fd7 100644
--- a/Help/command/set_directory_properties.rst
+++ b/Help/command/set_directory_properties.rst
@@ -1,12 +1,11 @@
set_directory_properties
------------------------
-Set a property of the directory.
+Set properties of the current directory and subdirectories in key-value pairs.
::
set_directory_properties(PROPERTIES prop1 value1 prop2 value2)
-Set a property for the current directory and subdirectories. See
-:ref:`Directory Properties` for the list of properties known
-to CMake.
+See :ref:`Directory Properties` for the list of properties known to CMake
+and their individual documentation for the behavior of each property.
diff --git a/Help/cpack_gen/bundle.rst b/Help/cpack_gen/bundle.rst
index 4628968..29727e2 100644
--- a/Help/cpack_gen/bundle.rst
+++ b/Help/cpack_gen/bundle.rst
@@ -1,14 +1,14 @@
CPack Bundle Generator
----------------------
-CPack Bundle generator (Mac OS X) specific options
+CPack Bundle generator (macOS) specific options
Variables specific to CPack Bundle generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Installers built on Mac OS X using the Bundle generator use the
-aforementioned DragNDrop (CPACK_DMG_xxx) variables, plus the following
-Bundle-specific parameters (CPACK_BUNDLE_xxx).
+Installers built on macOS using the Bundle generator use the
+aforementioned DragNDrop (``CPACK_DMG_xxx``) variables, plus the following
+Bundle-specific parameters (``CPACK_BUNDLE_xxx``).
.. variable:: CPACK_BUNDLE_NAME
@@ -25,7 +25,7 @@ Bundle-specific parameters (CPACK_BUNDLE_xxx).
Path to an OSX icon file that will be used as the icon for the generated
bundle. This is the icon that appears in the OSX finder for the bundle, and
- in the OSX dock when the bundle is opened. Required.
+ in the OSX dock when the bundle is opened. Required.
.. variable:: CPACK_BUNDLE_STARTUP_COMMAND
@@ -36,13 +36,13 @@ Bundle-specific parameters (CPACK_BUNDLE_xxx).
.. variable:: CPACK_BUNDLE_APPLE_CERT_APP
The name of your Apple supplied code signing certificate for the application.
- The name usually takes the form "Developer ID Application: [Name]" or
- "3rd Party Mac Developer Application: [Name]". If this variable is not set
+ The name usually takes the form ``Developer ID Application: [Name]`` or
+ ``3rd Party Mac Developer Application: [Name]``. If this variable is not set
the application will not be signed.
.. variable:: CPACK_BUNDLE_APPLE_ENTITLEMENTS
- The name of the plist file that contains your apple entitlements for sandboxing
+ The name of the ``Plist`` file that contains your apple entitlements for sandboxing
your application. This file is required for submission to the Mac App Store.
.. variable:: CPACK_BUNDLE_APPLE_CODESIGN_FILES
@@ -53,12 +53,12 @@ Bundle-specific parameters (CPACK_BUNDLE_xxx).
.. variable:: CPACK_BUNDLE_APPLE_CODESIGN_PARAMETER
- Additional parameter that will passed to codesign.
- Default value: "--deep -f"
+ Additional parameter that will passed to ``codesign``.
+ Default value: ``--deep -f``
.. variable:: CPACK_COMMAND_CODESIGN
- Path to the codesign(1) command used to sign applications with an
+ Path to the ``codesign(1)`` command used to sign applications with an
Apple cert. This variable can be used to override the automatically
detected command (or specify its location if the auto-detection fails
- to find it.)
+ to find it).
diff --git a/Help/cpack_gen/dmg.rst b/Help/cpack_gen/dmg.rst
index e4482ef..b7b3a0a 100644
--- a/Help/cpack_gen/dmg.rst
+++ b/Help/cpack_gen/dmg.rst
@@ -1,13 +1,13 @@
CPack DMG Generator
-------------------
-DragNDrop CPack generator (Mac OS X).
+DragNDrop CPack generator (macOS).
Variables specific to CPack DragNDrop generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following variables are specific to the DragNDrop installers built
-on Mac OS X:
+on macOS:
.. variable:: CPACK_DMG_VOLUME_NAME
@@ -16,33 +16,33 @@ on Mac OS X:
.. variable:: CPACK_DMG_FORMAT
- The disk image format. Common values are UDRO (UDIF read-only), UDZO (UDIF
- zlib-compressed) or UDBZ (UDIF bzip2-compressed). Refer to hdiutil(1) for
- more information on other available formats. Defaults to UDZO.
+ The disk image format. Common values are ``UDRO`` (UDIF read-only), ``UDZO`` (UDIF
+ zlib-compressed) or ``UDBZ`` (UDIF bzip2-compressed). Refer to ``hdiutil(1)`` for
+ more information on other available formats. Defaults to ``UDZO``.
.. variable:: CPACK_DMG_DS_STORE
- Path to a custom DS_Store file. This .DS_Store file e.g. can be used to
+ Path to a custom ``.DS_Store`` file. This ``.DS_Store`` file can be used to
specify the Finder window position/geometry and layout (such as hidden
toolbars, placement of the icons etc.). This file has to be generated by
the Finder (either manually or through AppleScript) using a normal folder
- from which the .DS_Store file can then be extracted.
+ from which the ``.DS_Store`` file can then be extracted.
.. variable:: CPACK_DMG_DS_STORE_SETUP_SCRIPT
Path to a custom AppleScript file. This AppleScript is used to generate
- a .DS_Store file which specifies the Finder window position/geometry and
+ a ``.DS_Store`` file which specifies the Finder window position/geometry and
layout (such as hidden toolbars, placement of the icons etc.).
By specifying a custom AppleScript there is no need to use
- CPACK_DMG_DS_STORE, as the .DS_Store that is generated by the AppleScript
+ ``CPACK_DMG_DS_STORE``, as the ``.DS_Store`` that is generated by the AppleScript
will be packaged.
.. variable:: CPACK_DMG_BACKGROUND_IMAGE
Path to an image file to be used as the background. This file will be
- copied to .background/background.<ext>, where ext is the original image file
+ copied to ``.background``/``background.<ext>``, where ``<ext>`` is the original image file
extension. The background image is installed into the image before
- CPACK_DMG_DS_STORE_SETUP_SCRIPT is executed or CPACK_DMG_DS_STORE is
+ ``CPACK_DMG_DS_STORE_SETUP_SCRIPT`` is executed or ``CPACK_DMG_DS_STORE`` is
installed. By default no background image is set.
.. variable:: CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK
@@ -83,19 +83,19 @@ on Mac OS X:
.. variable:: CPACK_COMMAND_HDIUTIL
- Path to the hdiutil(1) command used to operate on disk image files on Mac
- OS X. This variable can be used to override the automatically detected
- command (or specify its location if the auto-detection fails to find it.)
+ Path to the ``hdiutil(1)`` command used to operate on disk image files on
+ macOS. This variable can be used to override the automatically detected
+ command (or specify its location if the auto-detection fails to find it).
.. variable:: CPACK_COMMAND_SETFILE
- Path to the SetFile(1) command used to set extended attributes on files and
- directories on Mac OS X. This variable can be used to override the
+ Path to the ``SetFile(1)`` command used to set extended attributes on files and
+ directories on macOS. This variable can be used to override the
automatically detected command (or specify its location if the
- auto-detection fails to find it.)
+ auto-detection fails to find it).
.. variable:: CPACK_COMMAND_REZ
- Path to the Rez(1) command used to compile resources on Mac OS X. This
+ Path to the ``Rez(1)`` command used to compile resources on macOS. This
variable can be used to override the automatically detected command (or
- specify its location if the auto-detection fails to find it.)
+ specify its location if the auto-detection fails to find it).
diff --git a/Help/cpack_gen/ifw.rst b/Help/cpack_gen/ifw.rst
index 68776e1..e43b1d6 100644
--- a/Help/cpack_gen/ifw.rst
+++ b/Help/cpack_gen/ifw.rst
@@ -17,7 +17,7 @@ and meta information for QtIFW_ tools.
The QtIFW_ provides a set of tools and utilities to create
installers for the supported desktop Qt platforms: Linux, Microsoft Windows,
-and Mac OS X.
+and macOS.
You should also install QtIFW_ to use CPack ``IFW`` generator.
@@ -107,7 +107,7 @@ Package
.. variable:: CPACK_IFW_PACKAGE_ICON
- Filename for a custom installer icon. The actual file is '.icns' (Mac OS X),
+ Filename for a custom installer icon. The actual file is '.icns' (macOS),
'.ico' (Windows). No functionality on Unix.
.. variable:: CPACK_IFW_PACKAGE_WINDOW_ICON
diff --git a/Help/cpack_gen/packagemaker.rst b/Help/cpack_gen/packagemaker.rst
index f9abdd8..e9464b7 100644
--- a/Help/cpack_gen/packagemaker.rst
+++ b/Help/cpack_gen/packagemaker.rst
@@ -1,23 +1,23 @@
CPack PackageMaker Generator
----------------------------
-PackageMaker CPack generator (Mac OS X).
+PackageMaker CPack generator (macOS).
Variables specific to CPack PackageMaker generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following variable is specific to installers built on Mac
-OS X using PackageMaker:
+macOS using PackageMaker:
.. variable:: CPACK_OSX_PACKAGE_VERSION
- The version of Mac OS X that the resulting PackageMaker archive should be
- compatible with. Different versions of Mac OS X support different
+ The version of macOS that the resulting PackageMaker archive should be
+ compatible with. Different versions of macOS support different
features. For example, CPack can only build component-based installers for
- Mac OS X 10.4 or newer, and can only build installers that download
- component son-the-fly for Mac OS X 10.5 or newer. If left blank, this value
- will be set to the minimum version of Mac OS X that supports the requested
+ macOS 10.4 or newer, and can only build installers that download
+ component son-the-fly for macOS 10.5 or newer. If left blank, this value
+ will be set to the minimum version of macOS that supports the requested
features. Set this variable to some value (e.g., 10.4) only if you want to
- guarantee that your installer will work on that version of Mac OS X, and
+ guarantee that your installer will work on that version of macOS, and
don't mind missing extra features available in the installer shipping with
- later versions of Mac OS X.
+ later versions of macOS.
diff --git a/Help/cpack_gen/productbuild.rst b/Help/cpack_gen/productbuild.rst
index 1a6e0f8..d22fcd4 100644
--- a/Help/cpack_gen/productbuild.rst
+++ b/Help/cpack_gen/productbuild.rst
@@ -1,20 +1,20 @@
CPack productbuild Generator
----------------------------
-productbuild CPack generator (Mac OS X).
+productbuild CPack generator (macOS).
Variables specific to CPack productbuild generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following variable is specific to installers built on Mac
-OS X using ProductBuild:
+macOS using ProductBuild:
.. variable:: CPACK_COMMAND_PRODUCTBUILD
- Path to the productbuild(1) command used to generate a product archive for
- the OS X Installer or Mac App Store. This variable can be used to override
+ Path to the ``productbuild(1)`` command used to generate a product archive for
+ the macOS Installer or Mac App Store. This variable can be used to override
the automatically detected command (or specify its location if the
- auto-detection fails to find it.)
+ auto-detection fails to find it).
.. variable:: CPACK_PRODUCTBUILD_IDENTITY_NAME
@@ -28,9 +28,9 @@ OS X using ProductBuild:
.. variable:: CPACK_COMMAND_PKGBUILD
- Path to the pkgbuild(1) command used to generate an OS X component package
- on OS X. This variable can be used to override the automatically detected
- command (or specify its location if the auto-detection fails to find it.)
+ Path to the ``pkgbuild(1)`` command used to generate an macOS component package
+ on macOS. This variable can be used to override the automatically detected
+ command (or specify its location if the auto-detection fails to find it).
.. variable:: CPACK_PKGBUILD_IDENTITY_NAME
diff --git a/Help/envvar/CMAKE_OSX_ARCHITECTURES.rst b/Help/envvar/CMAKE_OSX_ARCHITECTURES.rst
index 8bbf993..5fd6e52 100644
--- a/Help/envvar/CMAKE_OSX_ARCHITECTURES.rst
+++ b/Help/envvar/CMAKE_OSX_ARCHITECTURES.rst
@@ -1,7 +1,7 @@
CMAKE_OSX_ARCHITECTURES
-----------------------
-Target specific architectures for OS X.
+Target specific architectures for macOS.
The ``CMAKE_OSX_ARCHITECTURES`` environment variable sets the default value for
the :variable:`CMAKE_OSX_ARCHITECTURES` variable. See
diff --git a/Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst b/Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst
index e6051b4..9dafa32 100644
--- a/Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst
+++ b/Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst
@@ -1,7 +1,7 @@
MACOSX_DEPLOYMENT_TARGET
------------------------
-Specify the minimum version of OS X on which the target binaries are
+Specify the minimum version of macOS on which the target binaries are
to be deployed.
The ``MACOSX_DEPLOYMENT_TARGET`` environment variable sets the default value for
diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst
index dd7934a..4fc484b 100644
--- a/Help/manual/cmake-buildsystem.7.rst
+++ b/Help/manual/cmake-buildsystem.7.rst
@@ -95,7 +95,7 @@ Apple Frameworks
""""""""""""""""
A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
-target property to create an OS X or iOS Framework Bundle.
+target property to create an macOS or iOS Framework Bundle.
The ``MACOSX_FRAMEWORK_IDENTIFIER`` sets ``CFBundleIdentifier`` key
and it uniquely identifies the bundle.
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 3eea8a2..d8a5def 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -24,6 +24,7 @@ Variables that Provide Information
/variable/CMAKE_CACHE_PATCH_VERSION
/variable/CMAKE_CFG_INTDIR
/variable/CMAKE_COMMAND
+ /variable/CMAKE_CPACK_COMMAND
/variable/CMAKE_CROSSCOMPILING
/variable/CMAKE_CROSSCOMPILING_EMULATOR
/variable/CMAKE_CTEST_COMMAND
diff --git a/Help/prop_dir/INCLUDE_DIRECTORIES.rst b/Help/prop_dir/INCLUDE_DIRECTORIES.rst
index 6789a56..5d856b8 100644
--- a/Help/prop_dir/INCLUDE_DIRECTORIES.rst
+++ b/Help/prop_dir/INCLUDE_DIRECTORIES.rst
@@ -11,11 +11,17 @@ target property, which is used by the generators to set the include
directories for the compiler.
In addition to accepting values from that command, values may be set
-directly on any directory using the :command:`set_property` command. A
-directory gets its initial value from its parent directory if it has one.
-The initial value of the :prop_tgt:`INCLUDE_DIRECTORIES` target property
+directly on any directory using the :command:`set_property` command, and can be
+set on the current directory using the :command:`set_directory_properties`
+command. A directory gets its initial value from its parent directory if it has
+one. The initial value of the :prop_tgt:`INCLUDE_DIRECTORIES` target property
comes from the value of this property. Both directory and target property
values are adjusted by calls to the :command:`include_directories` command.
+Calls to :command:`set_property` or :command:`set_directory_properties`,
+however, will update the directory property value without updating target
+property values. Therefore direct property updates must be made before
+calls to :command:`add_executable` or :command:`add_library` for targets
+they are meant to affect.
The target property values are used by the generators to set the
include paths for the compiler.
diff --git a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
index a064afa..d185d91 100644
--- a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
+++ b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
@@ -3,19 +3,19 @@ MACOSX_PACKAGE_LOCATION
Place a source file inside a Application Bundle
(:prop_tgt:`MACOSX_BUNDLE`), Core Foundation Bundle (:prop_tgt:`BUNDLE`),
-or Framework Bundle (:prop_tgt:`FRAMEWORK`). It is applicable for OS X
+or Framework Bundle (:prop_tgt:`FRAMEWORK`). It is applicable for macOS
and iOS.
Executable targets with the :prop_tgt:`MACOSX_BUNDLE` property set are
-built as OS X or iOS application bundles on Apple platforms. Shared
+built as macOS or iOS application bundles on Apple platforms. Shared
library targets with the :prop_tgt:`FRAMEWORK` property set are built as
-OS X or iOS frameworks on Apple platforms. Module library targets with
-the :prop_tgt:`BUNDLE` property set are built as OS X ``CFBundle`` bundles
+macOS or iOS frameworks on Apple platforms. Module library targets with
+the :prop_tgt:`BUNDLE` property set are built as macOS ``CFBundle`` bundles
on Apple platforms. Source files listed in the target with this property
set will be copied to a directory inside the bundle or framework content
-folder specified by the property value. For OS X Application Bundles the
-content folder is ``<name>.app/Contents``. For OS X Frameworks the
-content folder is ``<name>.framework/Versions/<version>``. For OS X
+folder specified by the property value. For macOS Application Bundles the
+content folder is ``<name>.app/Contents``. For macOS Frameworks the
+content folder is ``<name>.framework/Versions/<version>``. For macOS
CFBundles the content folder is ``<name>.bundle/Contents`` (unless the
extension is changed). See the :prop_tgt:`PUBLIC_HEADER`,
:prop_tgt:`PRIVATE_HEADER`, and :prop_tgt:`RESOURCE` target properties for
diff --git a/Help/prop_tgt/BUNDLE.rst b/Help/prop_tgt/BUNDLE.rst
index 075f017..c556ac3 100644
--- a/Help/prop_tgt/BUNDLE.rst
+++ b/Help/prop_tgt/BUNDLE.rst
@@ -1,7 +1,7 @@
BUNDLE
------
-This target is a ``CFBundle`` on the OS X.
+This target is a ``CFBundle`` on the macOS.
If a module library target has this property set to true it will be
built as a ``CFBundle`` when built on the mac. It will have the directory
diff --git a/Help/prop_tgt/BUNDLE_EXTENSION.rst b/Help/prop_tgt/BUNDLE_EXTENSION.rst
index 6b3d580..70de11c 100644
--- a/Help/prop_tgt/BUNDLE_EXTENSION.rst
+++ b/Help/prop_tgt/BUNDLE_EXTENSION.rst
@@ -2,7 +2,7 @@ BUNDLE_EXTENSION
----------------
The file extension used to name a :prop_tgt:`BUNDLE`, a :prop_tgt:`FRAMEWORK`,
-or a :prop_tgt:`MACOSX_BUNDLE` target on the OS X and iOS.
+or a :prop_tgt:`MACOSX_BUNDLE` target on the macOS and iOS.
The default value is ``bundle``, ``framework``, or ``app`` for the respective
target types.
diff --git a/Help/prop_tgt/ENABLE_EXPORTS.rst b/Help/prop_tgt/ENABLE_EXPORTS.rst
index 9e22309..581c2b9 100644
--- a/Help/prop_tgt/ENABLE_EXPORTS.rst
+++ b/Help/prop_tgt/ENABLE_EXPORTS.rst
@@ -12,7 +12,7 @@ dependency on the executable is created for targets that link to it.
For DLL platforms an import library will be created for the exported
symbols and then used for linking. All Windows-based systems
including Cygwin are DLL platforms. For non-DLL platforms that
-require all symbols to be resolved at link time, such as OS X, the
+require all symbols to be resolved at link time, such as macOS, the
module will "link" to the executable using a flag like
``-bundle_loader``. For other non-DLL platforms the link rule is simply
ignored since the dynamic loader will automatically bind symbols when
diff --git a/Help/prop_tgt/FRAMEWORK.rst b/Help/prop_tgt/FRAMEWORK.rst
index 495d30e..9dad060 100644
--- a/Help/prop_tgt/FRAMEWORK.rst
+++ b/Help/prop_tgt/FRAMEWORK.rst
@@ -1,17 +1,17 @@
FRAMEWORK
---------
-Build ``SHARED`` or ``STATIC`` library as Framework Bundle on the OS X and iOS.
+Build ``SHARED`` or ``STATIC`` library as Framework Bundle on the macOS and iOS.
If such a library target has this property set to ``TRUE`` it will be
-built as a framework when built on the OS X and iOS. It will have the
+built as a framework when built on the macOS and iOS. It will have the
directory structure required for a framework and will be suitable to
be used with the ``-framework`` option
To customize ``Info.plist`` file in the framework, use
:prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property.
-For OS X see also the :prop_tgt:`FRAMEWORK_VERSION` target property.
+For macOS see also the :prop_tgt:`FRAMEWORK_VERSION` target property.
Example of creation ``dynamicFramework``:
diff --git a/Help/prop_tgt/FRAMEWORK_VERSION.rst b/Help/prop_tgt/FRAMEWORK_VERSION.rst
index 6aa3026..c2ae7b9 100644
--- a/Help/prop_tgt/FRAMEWORK_VERSION.rst
+++ b/Help/prop_tgt/FRAMEWORK_VERSION.rst
@@ -4,5 +4,5 @@ FRAMEWORK_VERSION
Version of a framework created using the :prop_tgt:`FRAMEWORK` target
property (e.g. ``A``).
-This property only affects OS X, as iOS doesn't have versioned
+This property only affects macOS, as iOS doesn't have versioned
directory structure.
diff --git a/Help/prop_tgt/IMPORTED_LOCATION.rst b/Help/prop_tgt/IMPORTED_LOCATION.rst
index 8cfef73..2d07aad 100644
--- a/Help/prop_tgt/IMPORTED_LOCATION.rst
+++ b/Help/prop_tgt/IMPORTED_LOCATION.rst
@@ -5,11 +5,11 @@ Full path to the main file on disk for an IMPORTED target.
Set this to the location of an IMPORTED target file on disk. For
executables this is the location of the executable file. For bundles
-on OS X this is the location of the executable file inside
+on macOS this is the location of the executable file inside
Contents/MacOS under the application bundle folder. For static
libraries and modules this is the location of the library or module.
For shared libraries on non-DLL platforms this is the location of the
-shared library. For frameworks on OS X this is the location of the
+shared library. For frameworks on macOS this is the location of the
library file symlink just inside the framework folder. For DLLs this
is the location of the ".dll" part of the library. For UNKNOWN
libraries this is the location of the file to be linked. Ignored for
diff --git a/Help/prop_tgt/MACOSX_BUNDLE.rst b/Help/prop_tgt/MACOSX_BUNDLE.rst
index f9e11ee..92bce53 100644
--- a/Help/prop_tgt/MACOSX_BUNDLE.rst
+++ b/Help/prop_tgt/MACOSX_BUNDLE.rst
@@ -1,9 +1,9 @@
MACOSX_BUNDLE
-------------
-Build an executable as an Application Bundle on OS X or iOS.
+Build an executable as an Application Bundle on macOS or iOS.
-When this property is set to ``TRUE`` the executable when built on OS X
+When this property is set to ``TRUE`` the executable when built on macOS
or iOS will be created as an application bundle. This makes it
a GUI executable that can be launched from the Finder. See the
:prop_tgt:`MACOSX_BUNDLE_INFO_PLIST` target property for information about
diff --git a/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst b/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst
index 8515acc..443a645 100644
--- a/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst
+++ b/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst
@@ -1,10 +1,10 @@
MACOSX_BUNDLE_INFO_PLIST
------------------------
-Specify a custom ``Info.plist`` template for a OS X and iOS Application Bundle.
+Specify a custom ``Info.plist`` template for a macOS and iOS Application Bundle.
An executable target with :prop_tgt:`MACOSX_BUNDLE` enabled will be built as an
-application bundle on OS X. By default its ``Info.plist`` file is created
+application bundle on macOS. By default its ``Info.plist`` file is created
by configuring a template called ``MacOSXBundleInfo.plist.in`` located in the
:variable:`CMAKE_MODULE_PATH`. This property specifies an alternative template
file name which may be a full path.
diff --git a/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst b/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst
index 58f31d4..82fdcc0 100644
--- a/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst
+++ b/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst
@@ -1,10 +1,10 @@
MACOSX_FRAMEWORK_INFO_PLIST
---------------------------
-Specify a custom ``Info.plist`` template for a OS X and iOS Framework.
+Specify a custom ``Info.plist`` template for a macOS and iOS Framework.
A library target with :prop_tgt:`FRAMEWORK` enabled will be built as a
-framework on OS X. By default its ``Info.plist`` file is created by
+framework on macOS. By default its ``Info.plist`` file is created by
configuring a template called ``MacOSXFrameworkInfo.plist.in`` located in the
:variable:`CMAKE_MODULE_PATH`. This property specifies an alternative template
file name which may be a full path.
diff --git a/Help/prop_tgt/MACOSX_RPATH.rst b/Help/prop_tgt/MACOSX_RPATH.rst
index 1f9a036..acd5a7a 100644
--- a/Help/prop_tgt/MACOSX_RPATH.rst
+++ b/Help/prop_tgt/MACOSX_RPATH.rst
@@ -1,7 +1,7 @@
MACOSX_RPATH
------------
-Whether this target on OS X or iOS is located at runtime using rpaths.
+Whether this target on macOS or iOS is located at runtime using rpaths.
When this property is set to ``TRUE``, the directory portion of
the ``install_name`` field of this shared library will be ``@rpath``
diff --git a/Help/prop_tgt/OSX_ARCHITECTURES.rst b/Help/prop_tgt/OSX_ARCHITECTURES.rst
index cefe03f..996a4be 100644
--- a/Help/prop_tgt/OSX_ARCHITECTURES.rst
+++ b/Help/prop_tgt/OSX_ARCHITECTURES.rst
@@ -1,10 +1,10 @@
OSX_ARCHITECTURES
-----------------
-Target specific architectures for OS X.
+Target specific architectures for macOS.
The ``OSX_ARCHITECTURES`` property sets the target binary architecture for
-targets on OS X (``-arch``). This property is initialized by the value of the
+targets on macOS (``-arch``). This property is initialized by the value of the
variable :variable:`CMAKE_OSX_ARCHITECTURES` if it is set when a target is
created. Use :prop_tgt:`OSX_ARCHITECTURES_<CONFIG>` to set the binary
architectures on a per-configuration basis, where ``<CONFIG>`` is an
diff --git a/Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst b/Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst
index fb78177..06da4fb 100644
--- a/Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst
+++ b/Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst
@@ -1,7 +1,7 @@
OSX_ARCHITECTURES_<CONFIG>
--------------------------
-Per-configuration OS X and iOS binary architectures for a target.
+Per-configuration macOS and iOS binary architectures for a target.
This property is the configuration-specific version of
:prop_tgt:`OSX_ARCHITECTURES`.
diff --git a/Help/prop_tgt/PRIVATE_HEADER.rst b/Help/prop_tgt/PRIVATE_HEADER.rst
index c4412ed..2bd4079 100644
--- a/Help/prop_tgt/PRIVATE_HEADER.rst
+++ b/Help/prop_tgt/PRIVATE_HEADER.rst
@@ -4,7 +4,7 @@ PRIVATE_HEADER
Specify private header files in a :prop_tgt:`FRAMEWORK` shared library target.
Shared library targets marked with the :prop_tgt:`FRAMEWORK` property generate
-frameworks on OS X, iOS and normal shared libraries on other platforms.
+frameworks on macOS, iOS and normal shared libraries on other platforms.
This property may be set to a list of header files to be placed in the
PrivateHeaders directory inside the framework folder. On non-Apple
platforms these headers may be installed using the ``PRIVATE_HEADER``
diff --git a/Help/prop_tgt/PUBLIC_HEADER.rst b/Help/prop_tgt/PUBLIC_HEADER.rst
index d4a636c..549ac7c 100644
--- a/Help/prop_tgt/PUBLIC_HEADER.rst
+++ b/Help/prop_tgt/PUBLIC_HEADER.rst
@@ -4,7 +4,7 @@ PUBLIC_HEADER
Specify public header files in a :prop_tgt:`FRAMEWORK` shared library target.
Shared library targets marked with the :prop_tgt:`FRAMEWORK` property generate
-frameworks on OS X, iOS and normal shared libraries on other platforms.
+frameworks on macOS, iOS and normal shared libraries on other platforms.
This property may be set to a list of header files to be placed in the
``Headers`` directory inside the framework folder. On non-Apple platforms
these headers may be installed using the ``PUBLIC_HEADER`` option to the
diff --git a/Help/prop_tgt/RESOURCE.rst b/Help/prop_tgt/RESOURCE.rst
index d837f7b..55ae774 100644
--- a/Help/prop_tgt/RESOURCE.rst
+++ b/Help/prop_tgt/RESOURCE.rst
@@ -4,10 +4,10 @@ RESOURCE
Specify resource files in a :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE`.
Target marked with the :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE` property
-generate framework or application bundle (both OS X and iOS is supported)
+generate framework or application bundle (both macOS and iOS is supported)
or normal shared libraries on other platforms.
This property may be set to a list of files to be placed in the corresponding
-directory (eg. ``Resources`` directory for OS X) inside the bundle.
+directory (eg. ``Resources`` directory for macOS) inside the bundle.
On non-Apple platforms these files may be installed using the ``RESOURCE``
option to the ``install(TARGETS)`` command.
@@ -42,7 +42,7 @@ will produce flat structure for iOS systems::
Info.plist
resourcefile.txt
-For OS X systems it will produce following directory structure::
+For macOS systems it will produce following directory structure::
ExecutableTarget.app/
Contents
diff --git a/Help/prop_tgt/SOVERSION.rst b/Help/prop_tgt/SOVERSION.rst
index 82b6b97..b07c17c 100644
--- a/Help/prop_tgt/SOVERSION.rst
+++ b/Help/prop_tgt/SOVERSION.rst
@@ -20,7 +20,7 @@ These numbers are used as the image version of the binary.
Mach-O Versions
^^^^^^^^^^^^^^^
-For shared libraries and executables on Mach-O systems (e.g. OS X, iOS),
+For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
the ``SOVERSION`` property corresponds to *compatibility version* and
:prop_tgt:`VERSION` to *current version*. See the :prop_tgt:`FRAMEWORK` target
property for an example. Versions of Mach-O binaries may be checked with the
diff --git a/Help/prop_tgt/VERSION.rst b/Help/prop_tgt/VERSION.rst
index 66e7bde..ff3b303 100644
--- a/Help/prop_tgt/VERSION.rst
+++ b/Help/prop_tgt/VERSION.rst
@@ -22,7 +22,7 @@ These numbers are used as the image version of the binary.
Mach-O Versions
^^^^^^^^^^^^^^^
-For shared libraries and executables on Mach-O systems (e.g. OS X, iOS),
+For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
the :prop_tgt:`SOVERSION` property correspond to *compatibility version* and
``VERSION`` to *current version*. See the :prop_tgt:`FRAMEWORK` target
property for an example. Versions of Mach-O binaries may be checked with the
diff --git a/Help/variable/CMAKE_APPBUNDLE_PATH.rst b/Help/variable/CMAKE_APPBUNDLE_PATH.rst
index 2bc79ac..c1f0951 100644
--- a/Help/variable/CMAKE_APPBUNDLE_PATH.rst
+++ b/Help/variable/CMAKE_APPBUNDLE_PATH.rst
@@ -2,5 +2,5 @@ CMAKE_APPBUNDLE_PATH
--------------------
:ref:`;-list <CMake Language Lists>` of directories specifying a search path
-for OS X application bundles used by the :command:`find_program`, and
+for macOS application bundles used by the :command:`find_program`, and
:command:`find_package` commands.
diff --git a/Help/variable/CMAKE_CPACK_COMMAND.rst b/Help/variable/CMAKE_CPACK_COMMAND.rst
new file mode 100644
index 0000000..559108a
--- /dev/null
+++ b/Help/variable/CMAKE_CPACK_COMMAND.rst
@@ -0,0 +1,8 @@
+CMAKE_CPACK_COMMAND
+-------------------
+
+Full path to :manual:`cpack(1)` command installed with CMake.
+
+This is the full path to the CPack executable :manual:`cpack(1)` which is
+useful from custom commands that want to use the :manual:`cmake(1)` ``-E``
+option for portable system commands.
diff --git a/Help/variable/CMAKE_ENABLE_EXPORTS.rst b/Help/variable/CMAKE_ENABLE_EXPORTS.rst
index 9a877e7..7ec4d63 100644
--- a/Help/variable/CMAKE_ENABLE_EXPORTS.rst
+++ b/Help/variable/CMAKE_ENABLE_EXPORTS.rst
@@ -12,7 +12,7 @@ dependency on the executable is created for targets that link to it.
For DLL platforms an import library will be created for the exported
symbols and then used for linking. All Windows-based systems
including Cygwin are DLL platforms. For non-DLL platforms that
-require all symbols to be resolved at link time, such as OS X, the
+require all symbols to be resolved at link time, such as macOS, the
module will ``link`` to the executable using a flag like
``-bundle_loader``. For other non-DLL platforms the link rule is simply
ignored since the dynamic loader will automatically bind symbols when
diff --git a/Help/variable/CMAKE_FIND_APPBUNDLE.rst b/Help/variable/CMAKE_FIND_APPBUNDLE.rst
index e0727b5..7a05fac 100644
--- a/Help/variable/CMAKE_FIND_APPBUNDLE.rst
+++ b/Help/variable/CMAKE_FIND_APPBUNDLE.rst
@@ -2,9 +2,9 @@ CMAKE_FIND_APPBUNDLE
--------------------
This variable affects how ``find_*`` commands choose between
-OS X Application Bundles and unix-style package components.
+macOS Application Bundles and unix-style package components.
-On Darwin or systems supporting OS X Application Bundles, the
+On Darwin or systems supporting macOS Application Bundles, the
``CMAKE_FIND_APPBUNDLE`` variable can be set to empty or
one of the following:
diff --git a/Help/variable/CMAKE_FIND_FRAMEWORK.rst b/Help/variable/CMAKE_FIND_FRAMEWORK.rst
index 790694a..4d5078f 100644
--- a/Help/variable/CMAKE_FIND_FRAMEWORK.rst
+++ b/Help/variable/CMAKE_FIND_FRAMEWORK.rst
@@ -2,9 +2,9 @@ CMAKE_FIND_FRAMEWORK
--------------------
This variable affects how ``find_*`` commands choose between
-OS X Frameworks and unix-style package components.
+macOS Frameworks and unix-style package components.
-On Darwin or systems supporting OS X Frameworks, the
+On Darwin or systems supporting macOS Frameworks, the
``CMAKE_FIND_FRAMEWORK`` variable can be set to empty or
one of the following:
diff --git a/Help/variable/CMAKE_FRAMEWORK_PATH.rst b/Help/variable/CMAKE_FRAMEWORK_PATH.rst
index 5ff08e6..04751f8 100644
--- a/Help/variable/CMAKE_FRAMEWORK_PATH.rst
+++ b/Help/variable/CMAKE_FRAMEWORK_PATH.rst
@@ -2,6 +2,6 @@ CMAKE_FRAMEWORK_PATH
--------------------
:ref:`;-list <CMake Language Lists>` of directories specifying a search path
-for OS X frameworks used by the :command:`find_library`,
+for macOS frameworks used by the :command:`find_library`,
:command:`find_package`, :command:`find_path`, and :command:`find_file`
commands.
diff --git a/Help/variable/CMAKE_HOST_APPLE.rst b/Help/variable/CMAKE_HOST_APPLE.rst
index ac7b030..9c205ec 100644
--- a/Help/variable/CMAKE_HOST_APPLE.rst
+++ b/Help/variable/CMAKE_HOST_APPLE.rst
@@ -1,6 +1,6 @@
CMAKE_HOST_APPLE
----------------
-``True`` for Apple OS X operating systems.
+``True`` for Apple macOS operating systems.
-Set to ``true`` when the host system is Apple OS X.
+Set to ``true`` when the host system is Apple macOS.
diff --git a/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst b/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
index c673592..e892677 100644
--- a/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
+++ b/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
@@ -4,5 +4,5 @@ CMAKE_HOST_SYSTEM_NAME
Name of the OS CMake is running on.
On systems that have the uname command, this variable is set to the
-output of ``uname -s``. ``Linux``, ``Windows``, and ``Darwin`` for OS X
+output of ``uname -s``. ``Linux``, ``Windows``, and ``Darwin`` for macOS
are the values found on the big three operating systems.
diff --git a/Help/variable/CMAKE_INSTALL_NAME_DIR.rst b/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
index 1f2d62b..5ba4c04 100644
--- a/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
+++ b/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
@@ -1,7 +1,7 @@
CMAKE_INSTALL_NAME_DIR
----------------------
-OS X directory name for installed targets.
+macOS directory name for installed targets.
``CMAKE_INSTALL_NAME_DIR`` is used to initialize the
:prop_tgt:`INSTALL_NAME_DIR` property on all targets. See that target
diff --git a/Help/variable/CMAKE_MACOSX_RPATH.rst b/Help/variable/CMAKE_MACOSX_RPATH.rst
index 042e807..2fc648d 100644
--- a/Help/variable/CMAKE_MACOSX_RPATH.rst
+++ b/Help/variable/CMAKE_MACOSX_RPATH.rst
@@ -1,7 +1,7 @@
CMAKE_MACOSX_RPATH
-------------------
-Whether to use rpaths on OS X and iOS.
+Whether to use rpaths on macOS and iOS.
This variable is used to initialize the :prop_tgt:`MACOSX_RPATH` property on
all targets.
diff --git a/Help/variable/CMAKE_OSX_ARCHITECTURES.rst b/Help/variable/CMAKE_OSX_ARCHITECTURES.rst
index 51b840d..fdaca28 100644
--- a/Help/variable/CMAKE_OSX_ARCHITECTURES.rst
+++ b/Help/variable/CMAKE_OSX_ARCHITECTURES.rst
@@ -1,7 +1,7 @@
CMAKE_OSX_ARCHITECTURES
-----------------------
-Target specific architectures for OS X and iOS.
+Target specific architectures for macOS and iOS.
This variable is used to initialize the :prop_tgt:`OSX_ARCHITECTURES`
property on each target as it is created. See that target property
diff --git a/Help/variable/CMAKE_OSX_SYSROOT.rst b/Help/variable/CMAKE_OSX_SYSROOT.rst
index f1d58c6..db9fccd 100644
--- a/Help/variable/CMAKE_OSX_SYSROOT.rst
+++ b/Help/variable/CMAKE_OSX_SYSROOT.rst
@@ -1,7 +1,7 @@
CMAKE_OSX_SYSROOT
-----------------
-Specify the location or name of the OS X platform SDK to be used.
+Specify the location or name of the macOS platform SDK to be used.
CMake uses this value to compute the value of the ``-isysroot`` flag
or equivalent and to help the ``find_*`` commands locate files in
the SDK.
diff --git a/Help/variable/CMAKE_SYSTEM_APPBUNDLE_PATH.rst b/Help/variable/CMAKE_SYSTEM_APPBUNDLE_PATH.rst
index 3c6687c..666af46 100644
--- a/Help/variable/CMAKE_SYSTEM_APPBUNDLE_PATH.rst
+++ b/Help/variable/CMAKE_SYSTEM_APPBUNDLE_PATH.rst
@@ -1,7 +1,7 @@
CMAKE_SYSTEM_APPBUNDLE_PATH
---------------------------
-Search path for OS X application bundles used by the :command:`find_program`,
+Search path for macOS application bundles used by the :command:`find_program`,
and :command:`find_package` commands. By default it contains the standard
directories for the current system. It is *not* intended to be modified by
the project, use :variable:`CMAKE_APPBUNDLE_PATH` for this.
diff --git a/Help/variable/CMAKE_SYSTEM_FRAMEWORK_PATH.rst b/Help/variable/CMAKE_SYSTEM_FRAMEWORK_PATH.rst
index 1e8b0d9..14ba18e 100644
--- a/Help/variable/CMAKE_SYSTEM_FRAMEWORK_PATH.rst
+++ b/Help/variable/CMAKE_SYSTEM_FRAMEWORK_PATH.rst
@@ -1,7 +1,7 @@
CMAKE_SYSTEM_FRAMEWORK_PATH
---------------------------
-Search path for OS X frameworks used by the :command:`find_library`,
+Search path for macOS frameworks used by the :command:`find_library`,
:command:`find_package`, :command:`find_path`, and :command:`find_file`
commands. By default it contains the standard directories for the
current system. It is *not* intended to be modified by the project,
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index dc4d9be..5e2df26a 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -525,6 +525,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
${CMAKE_${lang}_COMPILER_ID_STRINGS_PARAMETERS}
REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]")
set(COMPILER_ID_TWICE)
+ # With the IAR Compiler, some strings are found twice, first time as incomplete
+ # list like "?<Constant "INFO:compiler[IAR]">". Remove the incomplete copies.
+ list(FILTER CMAKE_${lang}_COMPILER_ID_STRINGS EXCLUDE REGEX "\\?<Constant \\\"")
# In C# binaries, some strings are found more than once.
list(REMOVE_DUPLICATES CMAKE_${lang}_COMPILER_ID_STRINGS)
foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake
index fad2e8f..418bafd 100644
--- a/Modules/CMakeIOSInstallCombined.cmake
+++ b/Modules/CMakeIOSInstallCombined.cmake
@@ -1,6 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
# Function to print messages of this module
function(_ios_install_combined_message)
@@ -57,6 +59,7 @@ endfunction()
# Get architectures of given SDK (iphonesimulator/iphoneos)
function(_ios_install_combined_get_valid_archs sdk resultvar)
+ cmake_policy(PUSH)
cmake_policy(SET CMP0007 NEW)
if("${resultvar}" STREQUAL "")
@@ -73,6 +76,8 @@ function(_ios_install_combined_get_valid_archs sdk resultvar)
_ios_install_combined_message("Architectures (${sdk}): ${printable}")
set("${resultvar}" "${valid_archs}" PARENT_SCOPE)
+
+ cmake_policy(POP)
endfunction()
# Final target can contain more architectures that specified by SDK. This
@@ -161,8 +166,6 @@ function(_ios_install_combined_keep_archs lib archs)
endfunction()
function(_ios_install_combined_detect_sdks this_sdk_var corr_sdk_var)
- cmake_policy(SET CMP0057 NEW)
-
set(this_sdk "$ENV{PLATFORM_NAME}")
if("${this_sdk}" STREQUAL "")
message(FATAL_ERROR "Environment variable PLATFORM_NAME is empty")
@@ -305,3 +308,5 @@ function(ios_install_combined target destination)
_ios_install_combined_message("Install done: ${destination}")
endfunction()
+
+cmake_policy(POP)
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index cdc38a6..f3e3423 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -19,7 +19,7 @@ command (and the deprecated :command:`install_files`,
:command:`install_programs` and :command:`install_targets` commands).
For certain kinds of binary installers (including the graphical
-installers on Mac OS X and Windows), CPack generates installers that
+installers on macOS and Windows), CPack generates installers that
allow users to select individual application components to install.
See :module:`CPackComponent` module for further details.
diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake
index 6c122e5..a0d9935 100644
--- a/Modules/CPackComponent.cmake
+++ b/Modules/CPackComponent.cmake
@@ -14,7 +14,7 @@
# part of CPack. See CPack module for general information about CPack.
#
# For certain kinds of binary installers (including the graphical
-# installers on Mac OS X and Windows), CPack generates installers that
+# installers on macOS and Windows), CPack generates installers that
# allow users to select individual application components to install.
# The contents of each of the components are identified by the COMPONENT
# argument of CMake's INSTALL command. These components can be
@@ -283,8 +283,8 @@
#
#
#
-# On Mac OS X, installers that download components on-the-fly can only
-# be built and installed on system using Mac OS X 10.5 or later.
+# On macOS, installers that download components on-the-fly can only
+# be built and installed on system using macOS 10.5 or later.
#
# The site argument is a URL where the archives for downloadable
# components will reside, e.g.,
diff --git a/Modules/CSharpUtilities.cmake b/Modules/CSharpUtilities.cmake
index e9e1510..6a4b5c7 100644
--- a/Modules/CSharpUtilities.cmake
+++ b/Modules/CSharpUtilities.cmake
@@ -184,6 +184,9 @@ Helper functions which are used by the above ones
#]=======================================================================]
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
function(csharp_get_filename_keys OUT)
set(${OUT} "")
foreach(f ${ARGN})
@@ -304,3 +307,5 @@ function(csharp_set_xaml_cs_properties)
endif()
endforeach()
endfunction()
+
+cmake_policy(POP)
diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake
index 651bc3a..e12bfd1 100644
--- a/Modules/Compiler/IAR-ASM.cmake
+++ b/Modules/Compiler/IAR-ASM.cmake
@@ -18,4 +18,6 @@ elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
__compiler_iar_AVR(ASM)
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa)
+else()
+ message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID not detected as \"AVR\" or \"ARM\". This should be automatic.")
endif()
diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake
index 55e019e..2ed8818 100644
--- a/Modules/Compiler/IAR-C.cmake
+++ b/Modules/Compiler/IAR-C.cmake
@@ -5,6 +5,9 @@ include(Compiler/CMakeCommonCompilerMacros)
# The toolchains for ARM and AVR are quite different:
if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
+ if(NOT CMAKE_C_COMPILER_VERSION)
+ message(FATAL_ERROR "CMAKE_C_COMPILER_VERSION not detected. This should be automatic.")
+ endif()
set(CMAKE_C_EXTENSION_COMPILE_OPTION -e)
@@ -40,4 +43,7 @@ elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH)
get_filename_component(_compilerDir "${_compilerDir}" PATH)
include_directories("${_compilerDir}/inc" )
+
+else()
+ message(FATAL_ERROR "CMAKE_C_COMPILER_ARCHITECTURE_ID not detected as \"AVR\" or \"ARM\". This should be automatic.")
endif()
diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake
index 8d86100..5b783b2 100644
--- a/Modules/Compiler/IAR-CXX.cmake
+++ b/Modules/Compiler/IAR-CXX.cmake
@@ -10,6 +10,9 @@ if("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
#
# --c++ is full C++ and supported since 6.10
if(NOT CMAKE_IAR_CXX_FLAG)
+ if(NOT CMAKE_CXX_COMPILER_VERSION)
+ message(FATAL_ERROR "CMAKE_CXX_COMPILER_VERSION not detected. This should be automatic.")
+ endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.10)
set(CMAKE_IAR_CXX_FLAG --c++)
else()
@@ -48,4 +51,7 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH)
get_filename_component(_compilerDir "${_compilerDir}" PATH)
include_directories("${_compilerDir}/inc")
+
+else()
+ message(FATAL_ERROR "CMAKE_CXX_COMPILER_ARCHITECTURE_ID not detected as \"AVR\" or \"ARM\". This should be automatic." )
endif()
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index f65a493..37539ba 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -493,11 +493,11 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
if(Boost_MINOR_VERSION)
if(${Boost_MINOR_VERSION} GREATER 35)
# In Boost 1.36.0 and newer, the mangled compiler name used
- # on Mac OS X/Darwin is "xgcc".
+ # on macOS/Darwin is "xgcc".
set(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
else()
# In Boost <= 1.35.0, there is no mangled compiler name for
- # the Mac OS X/Darwin version of GCC.
+ # the macOS/Darwin version of GCC.
set(_boost_COMPILER "")
endif()
else()
@@ -573,7 +573,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
endif()
set(_Boost_IMPORTED_TARGETS TRUE)
- if(Boost_VERSION VERSION_LESS 103300)
+ if(Boost_VERSION AND Boost_VERSION VERSION_LESS 103300)
message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
set(_Boost_IMPORTED_TARGETS FALSE)
elseif(NOT Boost_VERSION VERSION_LESS 103300 AND Boost_VERSION VERSION_LESS 103500)
diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake
index 945ee0e..2ed9449 100644
--- a/Modules/FindDoxygen.cmake
+++ b/Modules/FindDoxygen.cmake
@@ -370,6 +370,9 @@ Deprecated Hint Variables
#]=======================================================================]
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
# For backwards compatibility support
if(Doxygen_FIND_QUIETLY)
set(DOXYGEN_FIND_QUIETLY TRUE)
@@ -1108,3 +1111,5 @@ doxygen_add_docs() for target ${targetName}")
)
endfunction()
+
+cmake_policy(POP)
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake
index 2c9ee11..a5bb863 100644
--- a/Modules/GoogleTest.cmake
+++ b/Modules/GoogleTest.cmake
@@ -308,7 +308,7 @@ function(gtest_add_tests)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source})
endif()
file(READ "${source}" contents)
- string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
+ string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests "${contents}")
foreach(hit ${found_tests})
string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit})
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index 4ef4539..ca3a004 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -10,6 +10,9 @@ if(CMAKE_BINARY_DIR)
message(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
endif()
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
function(cpack_deb_variable_fallback OUTPUT_VAR_NAME)
set(FALLBACK_VAR_NAMES ${ARGN})
@@ -579,3 +582,5 @@ function(cpack_deb_prepare_package_vars)
endfunction()
cpack_deb_prepare_package_vars()
+
+cmake_policy(POP)
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake
index 06298d7..3bd5147 100644
--- a/Modules/Internal/CPack/CPackRPM.cmake
+++ b/Modules/Internal/CPack/CPackRPM.cmake
@@ -3,6 +3,9 @@
# Author: Eric Noulard with the help of Alexander Neundorf.
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
function(get_file_permissions FILE RETURN_VAR)
execute_process(COMMAND ls -l ${FILE}
OUTPUT_VARIABLE permissions_
@@ -1865,3 +1868,5 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT
endfunction()
cpack_rpm_generate_package()
+
+cmake_policy(POP)
diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake
index e623902..bb42eed 100644
--- a/Modules/Platform/Android-Determine.cmake
+++ b/Modules/Platform/Android-Determine.cmake
@@ -18,6 +18,9 @@ if(CMAKE_SYSTEM_VERSION EQUAL 1)
return()
endif()
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
# If the user provided CMAKE_SYSROOT for us, extract information from it.
set(_ANDROID_SYSROOT_NDK "")
set(_ANDROID_SYSROOT_API "")
@@ -371,3 +374,5 @@ endif()
# Report the chosen architecture.
message(STATUS "Android: Targeting API '${CMAKE_SYSTEM_VERSION}' with architecture '${CMAKE_ANDROID_ARCH}', ABI '${CMAKE_ANDROID_ARCH_ABI}', and processor '${CMAKE_SYSTEM_PROCESSOR}'")
+
+cmake_policy(POP)
diff --git a/Modules/ProcessorCount.cmake b/Modules/ProcessorCount.cmake
index 772a615..8a37884 100644
--- a/Modules/ProcessorCount.cmake
+++ b/Modules/ProcessorCount.cmake
@@ -12,7 +12,7 @@
# Sets the variable named ${var} to the number of physical cores
# available on the machine if the information can be determined.
# Otherwise it is set to 0. Currently this functionality is implemented
-# for AIX, cygwin, FreeBSD, HPUX, IRIX, Linux, Mac OS X, QNX, Sun and
+# for AIX, cygwin, FreeBSD, HPUX, IRIX, Linux, macOS, QNX, Sun and
# Windows.
#
# This function is guaranteed to return a positive integer (>=1) if it
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 1e9f499..bd8ad4d 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 20180911)
+set(CMake_VERSION_PATCH 20180914)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 6347eed..acd6650 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -360,8 +360,6 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
return 0;
}
files = gl.GetFiles();
- std::vector<std::string>::iterator gfit;
- std::vector<cmsys::RegularExpression>::iterator regIt;
for (std::string const& gf : files) {
bool skip = false;
std::string inFile = gf;
@@ -1499,7 +1497,6 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
if (installTypes && *installTypes) {
std::vector<std::string> installTypesVector;
cmSystemTools::ExpandListArgument(installTypes, installTypesVector);
- std::vector<std::string>::iterator installTypesIt;
for (std::string const& installType : installTypesVector) {
component->InstallationTypes.push_back(
this->GetInstallationType(projectName, installType));
@@ -1511,7 +1508,6 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
if (depends && *depends) {
std::vector<std::string> dependsVector;
cmSystemTools::ExpandListArgument(depends, dependsVector);
- std::vector<std::string>::iterator dependIt;
for (std::string const& depend : dependsVector) {
cmCPackComponent* child = GetComponent(projectName, depend);
component->Dependencies.push_back(child);
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 54b4be2..3e0c1ac 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -56,7 +56,6 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
this->RunningCount = 0;
this->ProcessorsAvailable = cmAffinity::GetProcessorsAvailable();
this->HaveAffinity = this->ProcessorsAvailable.size();
- this->StopTimePassed = false;
this->HasCycles = false;
this->SerialTestRunning = false;
}
@@ -130,17 +129,6 @@ void cmCTestMultiProcessHandler::RunTests()
bool cmCTestMultiProcessHandler::StartTestProcess(int test)
{
- std::chrono::system_clock::time_point stop_time = this->CTest->GetStopTime();
- if (stop_time != std::chrono::system_clock::time_point() &&
- stop_time <= std::chrono::system_clock::now()) {
- cmCTestLog(this->CTest, ERROR_MESSAGE,
- "The stop time has been passed. "
- "Stopping all tests."
- << std::endl);
- this->StopTimePassed = true;
- return false;
- }
-
if (this->HaveAffinity && this->Properties[test]->WantAffinity) {
size_t needProcessors = this->GetProcessorsUsed(test);
if (needProcessors > this->ProcessorsAvailable.size()) {
@@ -199,6 +187,30 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test)
return false;
}
+bool cmCTestMultiProcessHandler::CheckStopTimePassed()
+{
+ if (!this->StopTimePassed) {
+ std::chrono::system_clock::time_point stop_time =
+ this->CTest->GetStopTime();
+ if (stop_time != std::chrono::system_clock::time_point() &&
+ stop_time <= std::chrono::system_clock::now()) {
+ this->SetStopTimePassed();
+ }
+ }
+ return this->StopTimePassed;
+}
+
+void cmCTestMultiProcessHandler::SetStopTimePassed()
+{
+ if (!this->StopTimePassed) {
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "The stop time has been passed. "
+ "Stopping all tests."
+ << std::endl);
+ this->StopTimePassed = true;
+ }
+}
+
void cmCTestMultiProcessHandler::LockResources(int index)
{
this->LockedResources.insert(
@@ -279,6 +291,10 @@ void cmCTestMultiProcessHandler::StartNextTests()
return;
}
+ if (this->CheckStopTimePassed()) {
+ return;
+ }
+
size_t numToStart = 0;
if (this->RunningCount < this->ParallelLevel) {
@@ -358,10 +374,6 @@ void cmCTestMultiProcessHandler::StartNextTests()
}
if (testLoadOk && processors <= numToStart && this->StartTest(test)) {
- if (this->StopTimePassed) {
- return;
- }
-
numToStart -= processors;
} else if (numToStart == 0) {
break;
@@ -424,8 +436,11 @@ void cmCTestMultiProcessHandler::FinishTestProcess(cmCTestRunTest* runner,
auto properties = runner->GetTestProperties();
bool testResult = runner->EndTest(this->Completed, this->Total, started);
+ if (runner->TimedOutForStopTime()) {
+ this->SetStopTimePassed();
+ }
if (started) {
- if (runner->StartAgain()) {
+ if (!this->StopTimePassed && runner->StartAgain()) {
this->Completed--; // remove the completed test because run again
return;
}
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 07a5fe7..3927a8a 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -113,6 +113,9 @@ protected:
inline size_t GetProcessorsUsed(int index);
std::string GetName(int index);
+ bool CheckStopTimePassed();
+ void SetStopTimePassed();
+
void LockResources(int index);
void UnlockResources(int index);
// map from test number to set of depend tests
@@ -125,7 +128,7 @@ protected:
size_t RunningCount;
std::set<size_t> ProcessorsAvailable;
size_t HaveAffinity;
- bool StopTimePassed;
+ bool StopTimePassed = false;
// list of test properties (indices concurrent to the test map)
PropertiesMap Properties;
std::map<int, bool> TestRunningMap;
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index ef0a49d..23d4616 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -140,6 +140,9 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
bool passed = true;
cmProcess::State res =
started ? this->TestProcess->GetProcessStatus() : cmProcess::State::Error;
+ if (res != cmProcess::State::Expired) {
+ this->TimeoutIsForStopTime = false;
+ }
int retVal = this->TestProcess->GetExitValue();
bool forceFail = false;
bool skipped = false;
@@ -537,6 +540,7 @@ bool cmCTestRunTest::StartTest(size_t total)
auto timeout = this->TestProperties->Timeout;
+ this->TimeoutIsForStopTime = false;
std::chrono::system_clock::time_point stop_time = this->CTest->GetStopTime();
if (stop_time != std::chrono::system_clock::time_point()) {
std::chrono::duration<double> stop_timeout =
@@ -547,6 +551,7 @@ bool cmCTestRunTest::StartTest(size_t total)
}
if (timeout == std::chrono::duration<double>::zero() ||
stop_timeout < timeout) {
+ this->TimeoutIsForStopTime = true;
timeout = stop_timeout;
}
}
diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h
index 3b1d674..7e80157 100644
--- a/Source/CTest/cmCTestRunTest.h
+++ b/Source/CTest/cmCTestRunTest.h
@@ -80,6 +80,8 @@ public:
void FinalizeTest();
+ bool TimedOutForStopTime() const { return this->TimeoutIsForStopTime; }
+
private:
bool NeedsToRerun();
void DartProcessing();
@@ -92,6 +94,7 @@ private:
void MemCheckPostProcess();
cmCTestTestHandler::cmCTestTestProperties* TestProperties;
+ bool TimeoutIsForStopTime = false;
// Pointer back to the "parent"; the handler that invoked this test run
cmCTestTestHandler* TestHandler;
cmCTest* CTest;
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 5d589cc..3761bd3 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -108,7 +108,7 @@ CMakeSetupDialog::CMakeSetupDialog()
QMenu* ToolsMenu = this->menuBar()->addMenu(tr("&Tools"));
this->ConfigureAction = ToolsMenu->addAction(tr("&Configure"));
- // prevent merging with Preferences menu item on Mac OS X
+ // prevent merging with Preferences menu item on macOS
this->ConfigureAction->setMenuRole(QAction::NoRole);
QObject::connect(this->ConfigureAction, SIGNAL(triggered(bool)), this,
SLOT(doConfigure()));
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 0e14a3f..0133b88 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -94,11 +94,11 @@ void QCMake::setBinaryDirectory(const QString& _dir)
}
const char* gen = state->GetCacheEntryValue("CMAKE_GENERATOR");
if (gen) {
- const char* extraGen =
+ const std::string* extraGen =
state->GetInitializedCacheValue("CMAKE_EXTRA_GENERATOR");
std::string curGen =
cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
- gen, extraGen ? extraGen : "");
+ gen, extraGen ? *extraGen : "");
this->setGenerator(QString::fromLocal8Bit(curGen.c_str()));
}
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index 1b3fb15..7d3aa57 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -614,7 +614,7 @@ bool QCMakeCacheModelDelegate::editorEvent(QEvent* e,
// Can remove this function and FileDialogFlag when minimum Qt version is 4.5
bool QCMakeCacheModelDelegate::eventFilter(QObject* object, QEvent* evt)
{
- // workaround for what looks like a bug in Qt on Mac OS X
+ // workaround for what looks like a bug in Qt on macOS
// where it doesn't create a QWidget wrapper for the native file dialog
// so the Qt library ends up assuming the focus was lost to something else
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index c7210b4..2b4ceaa 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -68,12 +68,12 @@ const char* cmCommandArgumentParserHelper::ExpandSpecialVariable(
return "";
}
if (strcmp(key, "CACHE") == 0) {
- if (const char* c =
+ if (const std::string* c =
this->Makefile->GetState()->GetInitializedCacheValue(var)) {
if (this->EscapeQuotes) {
- return this->AddString(cmSystemTools::EscapeQuotes(c));
+ return this->AddString(cmSystemTools::EscapeQuotes(*c));
}
- return this->AddString(c);
+ return this->AddString(*c);
}
return "";
}
@@ -253,7 +253,6 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
void cmCommandArgumentParserHelper::CleanupParser()
{
- std::vector<char*>::iterator sit;
for (char* var : this->Variables) {
delete[] var;
}
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 8d6efde..2107d32 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -30,7 +30,7 @@ Notes about linking on various platforms:
------------------------------------------------------------------------------
-Linux, FreeBSD, Mac OS X, IRIX, Sun, Windows:
+Linux, FreeBSD, macOS, IRIX, Sun, Windows:
Linking to libraries using the full path works fine.
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 313d46b..34f58ad 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -215,7 +215,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
std::string cacheEntryName = "CMAKE_ECLIPSE_ENVVAR_";
cacheEntryName += envVar;
- const char* cacheValue =
+ const std::string* cacheValue =
lg->GetState()->GetInitializedCacheValue(cacheEntryName);
// now we have both, decide which one to use
@@ -232,14 +232,14 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
} else if (!envVarSet && cacheValue != nullptr) {
// It is already in the cache, but not in the env, so use it from the cache
- valueToUse = cacheValue;
+ valueToUse = *cacheValue;
} else {
// It is both in the cache and in the env.
// Use the version from the env. except if the value from the env is
// completely contained in the value from the cache (for the case that we
// now have a PATH without MSVC dirs in the env. but had the full PATH with
// all MSVC dirs during the cmake run which stored the var in the cache:
- valueToUse = cacheValue;
+ valueToUse = *cacheValue;
if (valueToUse.find(envVarValue) == std::string::npos) {
valueToUse = envVarValue;
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8a8b3e4..24dc593 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -215,15 +215,15 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string& lang,
if (!optional && (path.empty() || !cmSystemTools::FileExists(path))) {
return;
}
- const char* cname =
+ const std::string* cname =
this->GetCMakeInstance()->GetState()->GetInitializedCacheValue(langComp);
std::string changeVars;
if (cname && !optional) {
std::string cnameString;
- if (!cmSystemTools::FileIsFullPath(cname)) {
- cnameString = cmSystemTools::FindProgram(cname);
+ if (!cmSystemTools::FileIsFullPath(*cname)) {
+ cnameString = cmSystemTools::FindProgram(*cname);
} else {
- cnameString = cname;
+ cnameString = *cname;
}
std::string pathString = path;
// get rid of potentially multiple slashes:
@@ -239,7 +239,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string& lang,
}
changeVars += langComp;
changeVars += ";";
- changeVars += cname;
+ changeVars += *cname;
this->GetCMakeInstance()->GetState()->SetGlobalProperty(
"__CMAKE_DELETE_CACHE_CHANGE_VARS_", changeVars.c_str());
}
@@ -1974,7 +1974,7 @@ void cmGlobalGenerator::AddMakefile(cmMakefile* mf)
// update progress
// estimate how many lg there will be
- const char* numGenC =
+ const std::string* numGenC =
this->CMakeInstance->GetState()->GetInitializedCacheValue(
"CMAKE_NUMBER_OF_MAKEFILES");
@@ -1992,7 +1992,7 @@ void cmGlobalGenerator::AddMakefile(cmMakefile* mf)
return;
}
- int numGen = atoi(numGenC);
+ int numGen = atoi(numGenC->c_str());
float prog = 0.9f * static_cast<float>(this->Makefiles.size()) /
static_cast<float>(numGen);
if (prog > 0.9f) {
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index c955af6..4f8f2e7 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1345,7 +1345,7 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
const std::string& lang,
const std::string& config)
{
- // Only add Mac OS X specific flags on Darwin platforms (OSX and iphone):
+ // Only add macOS specific flags on Darwin platforms (macOS and iOS):
if (this->Makefile->IsOn("APPLE") && this->EmitUniversalBinaryFlags) {
std::vector<std::string> archs;
target->GetAppleArchs(config, archs);
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 27a42b3..58b7762 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -300,14 +300,14 @@ public:
std::string const& GetCurrentSourceDirectory() const;
/**
- * Generate a Mac OS X application bundle Info.plist file.
+ * Generate a macOS application bundle Info.plist file.
*/
void GenerateAppleInfoPList(cmGeneratorTarget* target,
const std::string& targetName,
const char* fname);
/**
- * Generate a Mac OS X framework Info.plist file.
+ * Generate a macOS framework Info.plist file.
*/
void GenerateFrameworkInfoPList(cmGeneratorTarget* target,
const std::string& targetName,
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 360f73d..eb31478 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -564,8 +564,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
return std::string();
}
- // Expand rules in the empty string. It may insert the launcher and
- // perform replacements.
+ // Expand rule variables referenced in the given launcher command.
cmRulePlaceholderExpander::RuleVariables vars;
std::string output;
@@ -580,12 +579,10 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
}
vars.Output = output.c_str();
- std::string launcher = property_value;
- launcher += " ";
-
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
this->CreateRulePlaceholderExpander());
+ std::string launcher = property_value;
rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars);
if (!launcher.empty()) {
launcher += " ";
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index bc83ce2..690b827 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -967,8 +967,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
// Short-circuit if there is no launcher.
const char* val = this->GetRuleLauncher(target, "RULE_LAUNCH_CUSTOM");
if (val && *val) {
- // Expand rules in the empty string. It may insert the launcher and
- // perform replacements.
+ // Expand rule variables referenced in the given launcher command.
cmRulePlaceholderExpander::RuleVariables vars;
vars.CMTargetName = target->GetName().c_str();
vars.CMTargetType = cmState::GetTargetTypeName(target->GetType());
@@ -986,7 +985,6 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
vars.Output = output.c_str();
launcher = val;
- launcher += " ";
rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars);
if (!launcher.empty()) {
launcher += " ";
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 28e8195..fdcf0a8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1735,7 +1735,8 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
cmStateEnums::CacheEntryType type,
bool force)
{
- const char* existingValue = this->GetState()->GetInitializedCacheValue(name);
+ const std::string* existingValue =
+ this->GetState()->GetInitializedCacheValue(name);
// must be outside the following if() to keep it alive long enough
std::string nvalue;
@@ -1745,7 +1746,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
// if this is not a force, then use the value from the cache
// if it is a force, then use the value being passed in
if (!force) {
- value = existingValue;
+ value = existingValue->c_str();
}
if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) {
std::vector<std::string>::size_type cc;
@@ -1765,7 +1766,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
}
this->GetCMakeInstance()->AddCacheEntry(name, nvalue.c_str(), doc, type);
- nvalue = this->GetState()->GetInitializedCacheValue(name);
+ nvalue = *this->GetState()->GetInitializedCacheValue(name);
value = nvalue.c_str();
}
}
@@ -2385,17 +2386,15 @@ std::string cmMakefile::GetRequiredDefinition(const std::string& name) const
bool cmMakefile::IsDefinitionSet(const std::string& name) const
{
- const char* def;
- if (const std::string* d = this->StateSnapshot.GetDefinition(name)) {
- def = d->c_str();
- } else {
+ const std::string* def = this->StateSnapshot.GetDefinition(name);
+ if (!def) {
def = this->GetState()->GetInitializedCacheValue(name);
}
#ifdef CMAKE_BUILD_WITH_CMAKE
if (cmVariableWatch* vv = this->GetVariableWatch()) {
if (!def) {
vv->VariableAccessed(
- name, cmVariableWatch::UNKNOWN_VARIABLE_DEFINED_ACCESS, def, this);
+ name, cmVariableWatch::UNKNOWN_VARIABLE_DEFINED_ACCESS, nullptr, this);
}
}
#endif
@@ -2404,10 +2403,8 @@ bool cmMakefile::IsDefinitionSet(const std::string& name) const
const char* cmMakefile::GetDefinition(const std::string& name) const
{
- const char* def;
- if (const std::string* d = this->StateSnapshot.GetDefinition(name)) {
- def = d->c_str();
- } else {
+ const std::string* def = this->StateSnapshot.GetDefinition(name);
+ if (!def) {
def = this->GetState()->GetInitializedCacheValue(name);
}
#ifdef CMAKE_BUILD_WITH_CMAKE
@@ -2417,21 +2414,20 @@ const char* cmMakefile::GetDefinition(const std::string& name) const
vv->VariableAccessed(name,
def ? cmVariableWatch::VARIABLE_READ_ACCESS
: cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS,
- def, this);
+ (def ? def->c_str() : nullptr), this);
if (watch_function_executed) {
// A callback was executed and may have caused re-allocation of the
// variable storage. Look it up again for now.
// FIXME: Refactor variable storage to avoid this problem.
- if (const std::string* d = this->StateSnapshot.GetDefinition(name)) {
- def = d->c_str();
- } else {
+ def = this->StateSnapshot.GetDefinition(name);
+ if (!def) {
def = this->GetState()->GetInitializedCacheValue(name);
}
}
}
#endif
- return def;
+ return (def ? def->c_str() : nullptr);
}
const char* cmMakefile::GetSafeDefinition(const std::string& def) const
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index f21362a..529b4db 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -71,7 +71,7 @@ protected:
// write the depend rules for this target
void WriteTargetDependRules();
- // write rules for Mac OS X Application Bundle content.
+ // write rules for macOS Application Bundle content.
struct MacOSXContentGeneratorType
: cmOSXBundleGenerator::MacOSXContentGeneratorType
{
@@ -237,7 +237,7 @@ protected:
std::string TargetNameImport;
std::string TargetNamePDB;
- // Mac OS X content info.
+ // macOS content info.
std::set<std::string> MacContentFolders;
cmOSXBundleGenerator* OSXBundleGenerator;
MacOSXContentGeneratorType* MacOSXContentGenerator;
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index e58a8a0..373c693 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -135,7 +135,7 @@ protected:
void EnsureDirectoryExists(const std::string& dir) const;
void EnsureParentDirectoryExists(const std::string& path) const;
- // write rules for Mac OS X Application Bundle content.
+ // write rules for macOS Application Bundle content.
struct MacOSXContentGeneratorType
: cmOSXBundleGenerator::MacOSXContentGeneratorType
{
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 231cacb..2cad657 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -1339,20 +1339,20 @@ cmServerResponse cmServerProtocol1::ProcessConfigure(
if (cm->LoadCache(buildDir)) {
// build directory has been set up before
- const char* cachedSourceDir =
+ const std::string* cachedSourceDir =
cm->GetState()->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY");
if (!cachedSourceDir) {
return request.ReportError("No CMAKE_HOME_DIRECTORY found in cache.");
}
if (sourceDir.empty()) {
- sourceDir = std::string(cachedSourceDir);
+ sourceDir = *cachedSourceDir;
cm->SetHomeDirectory(sourceDir);
}
- const char* cachedGenerator =
+ const std::string* cachedGenerator =
cm->GetState()->GetInitializedCacheValue("CMAKE_GENERATOR");
if (cachedGenerator) {
- if (gg && gg->GetName() != cachedGenerator) {
+ if (gg && gg->GetName() != *cachedGenerator) {
return request.ReportError("Configured generator does not match with "
"CMAKE_GENERATOR found in cache.");
}
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index e01bf71..c8b8653 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -140,10 +140,10 @@ const char* cmState::GetCacheEntryValue(std::string const& key) const
return e->Value.c_str();
}
-const char* cmState::GetInitializedCacheValue(std::string const& key) const
+const std::string* cmState::GetInitializedCacheValue(
+ std::string const& key) const
{
- const std::string* p = this->CacheManager->GetInitializedCacheValue(key);
- return p ? p->c_str() : nullptr;
+ return this->CacheManager->GetInitializedCacheValue(key);
}
cmStateEnums::CacheEntryType cmState::GetCacheEntryType(
diff --git a/Source/cmState.h b/Source/cmState.h
index 38bdfec..ca7093a 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -68,7 +68,7 @@ public:
std::vector<std::string> GetCacheEntryKeys() const;
const char* GetCacheEntryValue(std::string const& key) const;
- const char* GetInitializedCacheValue(std::string const& key) const;
+ const std::string* GetInitializedCacheValue(std::string const& key) const;
cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) const;
void SetCacheEntryValue(std::string const& key, std::string const& value);
void SetCacheValue(std::string const& key, std::string const& value);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 1bf8f7d..783dbf2 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -319,9 +319,10 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
bool haveValue = false;
std::string cachedValue;
if (this->WarnUnusedCli) {
- if (const char* v = this->State->GetInitializedCacheValue(var)) {
+ if (const std::string* v =
+ this->State->GetInitializedCacheValue(var)) {
haveValue = true;
- cachedValue = v;
+ cachedValue = *v;
}
}
@@ -331,7 +332,7 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
if (this->WarnUnusedCli) {
if (!haveValue ||
- cachedValue != this->State->GetInitializedCacheValue(var)) {
+ cachedValue != *this->State->GetInitializedCacheValue(var)) {
this->WatchUnusedCli(var);
}
}
@@ -1107,7 +1108,7 @@ int cmake::DoPreConfigureChecks()
// do a sanity check on some values
if (this->State->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY")) {
std::string cacheStart =
- this->State->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY");
+ *this->State->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY");
cacheStart += "/CMakeLists.txt";
std::string currentStart = this->GetHomeDirectory();
currentStart += "/CMakeLists.txt";
@@ -1276,14 +1277,14 @@ int cmake::ActualConfigure()
// no generator specified on the command line
if (!this->GlobalGenerator) {
- const char* genName =
+ const std::string* genName =
this->State->GetInitializedCacheValue("CMAKE_GENERATOR");
- const char* extraGenName =
+ const std::string* extraGenName =
this->State->GetInitializedCacheValue("CMAKE_EXTRA_GENERATOR");
if (genName) {
std::string fullName =
cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
- genName, extraGenName ? extraGenName : "");
+ *genName, extraGenName ? *extraGenName : "");
this->GlobalGenerator = this->CreateGlobalGenerator(fullName);
}
if (this->GlobalGenerator) {
@@ -1301,14 +1302,14 @@ int cmake::ActualConfigure()
}
}
- const char* genName =
+ const std::string* genName =
this->State->GetInitializedCacheValue("CMAKE_GENERATOR");
if (genName) {
- if (!this->GlobalGenerator->MatchesGeneratorName(genName)) {
+ if (!this->GlobalGenerator->MatchesGeneratorName(*genName)) {
std::string message = "Error: generator : ";
message += this->GlobalGenerator->GetName();
message += "\nDoes not match the generator used previously: ";
- message += genName;
+ message += *genName;
message += "\nEither remove the CMakeCache.txt file and CMakeFiles "
"directory or choose a different binary directory.";
cmSystemTools::Error(message.c_str());
@@ -1325,14 +1326,14 @@ int cmake::ActualConfigure()
cmStateEnums::INTERNAL);
}
- if (const char* instance =
+ if (const std::string* instance =
this->State->GetInitializedCacheValue("CMAKE_GENERATOR_INSTANCE")) {
if (!this->GeneratorInstance.empty() &&
- this->GeneratorInstance != instance) {
+ this->GeneratorInstance != *instance) {
std::string message = "Error: generator instance: ";
message += this->GeneratorInstance;
message += "\nDoes not match the instance used previously: ";
- message += instance;
+ message += *instance;
message += "\nEither remove the CMakeCache.txt file and CMakeFiles "
"directory or choose a different binary directory.";
cmSystemTools::Error(message.c_str());
@@ -1344,14 +1345,14 @@ int cmake::ActualConfigure()
"Generator instance identifier.", cmStateEnums::INTERNAL);
}
- if (const char* platformName =
+ if (const std::string* platformName =
this->State->GetInitializedCacheValue("CMAKE_GENERATOR_PLATFORM")) {
if (!this->GeneratorPlatform.empty() &&
- this->GeneratorPlatform != platformName) {
+ this->GeneratorPlatform != *platformName) {
std::string message = "Error: generator platform: ";
message += this->GeneratorPlatform;
message += "\nDoes not match the platform used previously: ";
- message += platformName;
+ message += *platformName;
message += "\nEither remove the CMakeCache.txt file and CMakeFiles "
"directory or choose a different binary directory.";
cmSystemTools::Error(message.c_str());
@@ -1363,13 +1364,13 @@ int cmake::ActualConfigure()
"Name of generator platform.", cmStateEnums::INTERNAL);
}
- if (const char* tsName =
+ if (const std::string* tsName =
this->State->GetInitializedCacheValue("CMAKE_GENERATOR_TOOLSET")) {
- if (!this->GeneratorToolset.empty() && this->GeneratorToolset != tsName) {
+ if (!this->GeneratorToolset.empty() && this->GeneratorToolset != *tsName) {
std::string message = "Error: generator toolset: ";
message += this->GeneratorToolset;
message += "\nDoes not match the toolset used previously: ";
- message += tsName;
+ message += *tsName;
message += "\nEither remove the CMakeCache.txt file and CMakeFiles "
"directory or choose a different binary directory.";
cmSystemTools::Error(message.c_str());
@@ -1685,7 +1686,8 @@ std::string cmake::StripExtension(const std::string& file) const
const char* cmake::GetCacheDefinition(const std::string& name) const
{
- return this->State->GetInitializedCacheValue(name);
+ const std::string* p = this->State->GetInitializedCacheValue(name);
+ return p ? p->c_str() : nullptr;
}
void cmake::AddScriptingCommands()
@@ -1868,14 +1870,14 @@ void cmake::PrintGeneratorList()
void cmake::UpdateConversionPathTable()
{
// Update the path conversion table with any specified file:
- const char* tablepath =
+ const std::string* tablepath =
this->State->GetInitializedCacheValue("CMAKE_PATH_TRANSLATION_FILE");
if (tablepath) {
- cmsys::ifstream table(tablepath);
+ cmsys::ifstream table(tablepath->c_str());
if (!table) {
- cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to ", tablepath,
- ". CMake can not open file.");
+ cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to ",
+ tablepath->c_str(), ". CMake can not open file.");
cmSystemTools::ReportLastSystemError("CMake can not open file.");
} else {
std::string a, b;
@@ -2527,11 +2529,11 @@ bool cmake::Open(const std::string& dir, bool dryRun)
std::cerr << "Error: could not find CMAKE_GENERATOR in Cache\n";
return false;
}
- const char* extraGenName =
+ const std::string* extraGenName =
this->State->GetInitializedCacheValue("CMAKE_EXTRA_GENERATOR");
std::string fullName =
cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
- genName, extraGenName ? extraGenName : "");
+ genName, extraGenName ? *extraGenName : "");
std::unique_ptr<cmGlobalGenerator> gen(
this->CreateGlobalGenerator(fullName));
diff --git a/Tests/GoogleTest/Test/CMakeLists.txt b/Tests/GoogleTest/Test/CMakeLists.txt
index f798d31..baf00d5 100644
--- a/Tests/GoogleTest/Test/CMakeLists.txt
+++ b/Tests/GoogleTest/Test/CMakeLists.txt
@@ -44,12 +44,13 @@ endif()
set_tests_properties(set2.GoogleTest.ConditionalFail.foo PROPERTIES WILL_FAIL YES)
-# Search specific sources to get the test list
-add_executable(test_gtest2 main2.cxx)
+# Search specific sources to get the test list. Include an empty file
+# to ensure they are handled correctly too.
+add_executable(test_gtest2 main2.cxx empty.cxx)
target_link_libraries(test_gtest2 GTest::Main)
gtest_add_tests(TARGET test_gtest2
TEST_LIST testList
- SOURCES main2.h
+ SOURCES main2.h empty.cxx
)
set(expectedTests
GoogleTest.SomethingElse
diff --git a/Tests/GoogleTest/Test/empty.cxx b/Tests/GoogleTest/Test/empty.cxx
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/GoogleTest/Test/empty.cxx
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index e0ddc9c..4b366a8 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -205,15 +205,16 @@ function(run_sub_cmake test ninja_output_path_prefix)
set(cmd_prefix "")
set(cmd_suffix "")
endif()
+ set(fs_delay 3) # We assume the system as 1 sec timestamp resolution.
file(WRITE "${top_build_ninja}" "\
subninja ${escaped_ninja_output_path_prefix}/build.ninja
default ${escaped_ninja_output_path_prefix}/all
-# Sleep for 1 second before to regenerate to make sure the timestamp of
+# Sleep for long enough before regenerating to make sure the timestamp of
# the top build.ninja will be strictly greater than the timestamp of the
-# sub/build.ninja file. We assume the system as 1 sec timestamp resolution.
+# sub/build.ninja file.
rule RERUN
- command = ${cmd_prefix}\"${escaped_CMAKE_COMMAND}\" -E sleep 1 && \"${escaped_CMAKE_COMMAND}\" -E touch \"${escaped_top_build_ninja}\"${cmd_suffix}
+ command = ${cmd_prefix}\"${escaped_CMAKE_COMMAND}\" -E sleep ${fs_delay} && \"${escaped_CMAKE_COMMAND}\" -E touch \"${escaped_top_build_ninja}\"${cmd_suffix}
description = Testing regeneration
generator = 1
@@ -239,7 +240,7 @@ build build.ninja: RERUN ${escaped_build_ninja_dep} || ${escaped_ninja_output_pa
# Test regeneration rules run in order.
set(main_cmakelists "${RunCMake_SOURCE_DIR}/CMakeLists.txt")
- sleep(1) # Assume the system as 1 sec timestamp resolution.
+ sleep(${fs_delay})
touch("${main_cmakelists}")
touch("${build_ninja_dep}")
run_ninja("${top_build_dir}")