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/cmake_host_system_information.rst12
-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-generator-expressions.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/CPack.cmake2
-rw-r--r--Modules/CPackComponent.cmake6
-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.cmake4
-rw-r--r--Modules/FindDoxygen.cmake5
-rw-r--r--Modules/FindMPI.cmake2
-rw-r--r--Modules/GoogleTest.cmake2
-rw-r--r--Modules/ProcessorCount.cmake2
-rw-r--r--Source/CMakeLists.txt1
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackGenerator.cxx4
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx59
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.h5
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx2
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx2
-rw-r--r--Source/cmCTest.cxx6
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx1
-rw-r--r--Source/cmComputeLinkDepends.cxx33
-rw-r--r--Source/cmComputeLinkDepends.h9
-rw-r--r--Source/cmComputeLinkInformation.cxx2
-rw-r--r--Source/cmComputeTargetDepends.cxx46
-rw-r--r--Source/cmComputeTargetDepends.h4
-rw-r--r--Source/cmExportBuildAndroidMKGenerator.cxx2
-rw-r--r--Source/cmExportFileGenerator.cxx12
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx3
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx12
-rw-r--r--Source/cmGeneratorExpression.cxx14
-rw-r--r--Source/cmGeneratorExpression.h55
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx13
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h13
-rw-r--r--Source/cmGeneratorExpressionNode.cxx13
-rw-r--r--Source/cmGeneratorTarget.cxx87
-rw-r--r--Source/cmGeneratorTarget.h2
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx12
-rw-r--r--Source/cmLinkItem.cxx72
-rw-r--r--Source/cmLinkItem.h38
-rw-r--r--Source/cmLocalGenerator.cxx2
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx3
-rw-r--r--Source/cmMakefileTargetGenerator.cxx3
-rw-r--r--Source/cmMakefileTargetGenerator.h4
-rw-r--r--Source/cmNinjaTargetGenerator.cxx11
-rw-r--r--Source/cmNinjaTargetGenerator.h2
-rw-r--r--Source/cmServerProtocol.cxx9
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx3
-rw-r--r--Tests/CMakeLists.txt1
-rw-r--r--Tests/GoogleTest/Test/CMakeLists.txt7
-rw-r--r--Tests/GoogleTest/Test/empty.cxx0
-rw-r--r--Tests/ImportedSameName/A/CMakeLists.txt8
-rw-r--r--Tests/ImportedSameName/A/a.c3
-rw-r--r--Tests/ImportedSameName/B/CMakeLists.txt8
-rw-r--r--Tests/ImportedSameName/B/b.c3
-rw-r--r--Tests/ImportedSameName/CMakeLists.txt8
-rw-r--r--Tests/ImportedSameName/main.c16
-rw-r--r--Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt8
-rw-r--r--Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt8
-rw-r--r--Tests/RunCMake/ctest_start/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/ctest_start/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_test/CTestTestLoadFail-result.txt1
-rw-r--r--Tests/RunCMake/ctest_test/CTestTestLoadFail-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_test/CTestTestLoadFail-stdout.txt2
-rw-r--r--Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt8
-rw-r--r--Tests/RunCMake/ctest_test/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/ctest_test/TestLoadFail-result.txt1
-rw-r--r--Tests/RunCMake/ctest_test/TestLoadFail-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_test/TestLoadFail-stdout.txt2
-rw-r--r--Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt8
-rwxr-xr-xbootstrap1
124 files changed, 570 insertions, 411 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/cmake_host_system_information.rst b/Help/command/cmake_host_system_information.rst
index 9893151..2dee93a 100644
--- a/Help/command/cmake_host_system_information.rst
+++ b/Help/command/cmake_host_system_information.rst
@@ -20,10 +20,10 @@ Key Description
``NUMBER_OF_PHYSICAL_CORES`` Number of physical cores
``HOSTNAME`` Hostname
``FQDN`` Fully qualified domain name
-``TOTAL_VIRTUAL_MEMORY`` Total virtual memory in megabytes
-``AVAILABLE_VIRTUAL_MEMORY`` Available virtual memory in megabytes
-``TOTAL_PHYSICAL_MEMORY`` Total physical memory in megabytes
-``AVAILABLE_PHYSICAL_MEMORY`` Available physical memory in megabytes
+``TOTAL_VIRTUAL_MEMORY`` Total virtual memory in MiB [#mebibytes]_
+``AVAILABLE_VIRTUAL_MEMORY`` Available virtual memory in MiB [#mebibytes]_
+``TOTAL_PHYSICAL_MEMORY`` Total physical memory in MiB [#mebibytes]_
+``AVAILABLE_PHYSICAL_MEMORY`` Available physical memory in MiB [#mebibytes]_
``IS_64BIT`` One if processor is 64Bit
``HAS_FPU`` One if processor has floating point unit
``HAS_MMX`` One if processor supports MMX instructions
@@ -44,3 +44,7 @@ Key Description
``OS_VERSION`` The OS build ID
``OS_PLATFORM`` See :variable:`CMAKE_HOST_SYSTEM_PROCESSOR`
============================= ================================================
+
+.. rubric:: Footnotes
+
+.. [#mebibytes] One MiB (mebibyte) is equal to 1024x1024 bytes.
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-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index 8fd07d7..c3428d1 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -51,7 +51,7 @@ Available logical expressions are:
``0`` if all ``?`` are ``0``, else ``1``
``$<NOT:?>``
``0`` if ``?`` is ``1``, else ``1``
-``$<IF:?,true-value...,false-value...>```
+``$<IF:?,true-value...,false-value...>``
``true-value...`` if ``?`` is ``1``, ``false-value...`` if ``?`` is ``0``
``$<STREQUAL:a,b>``
``1`` if ``a`` is STREQUAL ``b``, else ``0``
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/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/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..24ee1f2 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()
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/FindMPI.cmake b/Modules/FindMPI.cmake
index 75c4441..bfcd876 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -1680,7 +1680,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}")
unset(MPI_${LANG}_COMPILE_FLAGS)
if(MPI_${LANG}_COMPILE_OPTIONS)
- set(MPI_${LANG}_COMPILE_FLAGS "${MPI_${LANG}_COMPILE_OPTIONS}")
+ list(JOIN MPI_${LANG}_COMPILE_FLAGS " " MPI_${LANG}_COMPILE_OPTIONS)
endif()
if(MPI_${LANG}_COMPILE_DEFINITIONS)
foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS)
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/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/CMakeLists.txt b/Source/CMakeLists.txt
index 0457984..628cc6f 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -265,6 +265,7 @@ set(SRCS
cmInstallDirectoryGenerator.h
cmInstallDirectoryGenerator.cxx
cmLinkedTree.h
+ cmLinkItem.cxx
cmLinkItem.h
cmLinkLineComputer.cxx
cmLinkLineComputer.h
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 83b75fb..1819564 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 20180910)
+set(CMake_VERSION_PATCH 20180912)
#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 52db9d4..54b4be2 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -5,7 +5,6 @@
#include "cmAffinity.h"
#include "cmCTest.h"
#include "cmCTestRunTest.h"
-#include "cmCTestScriptHandler.h"
#include "cmCTestTestHandler.h"
#include "cmSystemTools.h"
#include "cmWorkingDirectory.h"
@@ -52,6 +51,7 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
{
this->ParallelLevel = 1;
this->TestLoad = 0;
+ this->FakeLoadForTesting = 0;
this->Completed = 0;
this->RunningCount = 0;
this->ProcessorsAvailable = cmAffinity::GetProcessorsAvailable();
@@ -96,6 +96,16 @@ void cmCTestMultiProcessHandler::SetParallelLevel(size_t level)
void cmCTestMultiProcessHandler::SetTestLoad(unsigned long load)
{
this->TestLoad = load;
+
+ std::string fake_load_value;
+ if (cmSystemTools::GetEnv("__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING",
+ fake_load_value)) {
+ if (!cmSystemTools::StringToULong(fake_load_value.c_str(),
+ &this->FakeLoadForTesting)) {
+ cmSystemTools::Error("Failed to parse fake load value: ",
+ fake_load_value.c_str());
+ }
+ }
}
void cmCTestMultiProcessHandler::RunTests()
@@ -258,12 +268,19 @@ bool cmCTestMultiProcessHandler::StartTest(int test)
void cmCTestMultiProcessHandler::StartNextTests()
{
- size_t numToStart = 0;
+ if (this->TestLoadRetryTimer.get() != nullptr) {
+ // This timer may be waiting to call StartNextTests again.
+ // Since we have been called it is no longer needed.
+ uv_timer_stop(this->TestLoadRetryTimer);
+ }
if (this->Tests.empty()) {
+ this->TestLoadRetryTimer.reset();
return;
}
+ size_t numToStart = 0;
+
if (this->RunningCount < this->ParallelLevel) {
numToStart = this->ParallelLevel - this->RunningCount;
}
@@ -279,7 +296,6 @@ void cmCTestMultiProcessHandler::StartNextTests()
}
bool allTestsFailedTestLoadCheck = false;
- bool usedFakeLoadForTesting = false;
size_t minProcessorsRequired = this->ParallelLevel;
std::string testWithMinProcessors;
@@ -292,15 +308,11 @@ void cmCTestMultiProcessHandler::StartNextTests()
allTestsFailedTestLoadCheck = true;
// Check for a fake load average value used in testing.
- std::string fake_load_value;
- if (cmSystemTools::GetEnv("__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING",
- fake_load_value)) {
- usedFakeLoadForTesting = true;
- if (!cmSystemTools::StringToULong(fake_load_value.c_str(),
- &systemLoad)) {
- cmSystemTools::Error("Failed to parse fake load value: ",
- fake_load_value.c_str());
- }
+ if (this->FakeLoadForTesting > 0) {
+ systemLoad = this->FakeLoadForTesting;
+ // Drop the fake load for the next iteration to a value low enough
+ // that the next iteration will start tests.
+ this->FakeLoadForTesting = 1;
}
// If it's not set, look up the true load average.
else {
@@ -384,18 +396,25 @@ void cmCTestMultiProcessHandler::StartNextTests()
}
cmCTestLog(this->CTest, HANDLER_OUTPUT, "*****" << std::endl);
- if (usedFakeLoadForTesting) {
- // Break out of the infinite loop of waiting for our fake load
- // to come down.
- this->StopTimePassed = true;
- } else {
- // Wait between 1 and 5 seconds before trying again.
- cmCTestScriptHandler::SleepInSeconds(cmSystemTools::RandomSeed() % 5 +
- 1);
+ // Wait between 1 and 5 seconds before trying again.
+ unsigned int milliseconds = (cmSystemTools::RandomSeed() % 5 + 1) * 1000;
+ if (this->FakeLoadForTesting) {
+ milliseconds = 10;
+ }
+ if (this->TestLoadRetryTimer.get() == nullptr) {
+ this->TestLoadRetryTimer.init(this->Loop, this);
}
+ this->TestLoadRetryTimer.start(
+ &cmCTestMultiProcessHandler::OnTestLoadRetryCB, milliseconds, 0);
}
}
+void cmCTestMultiProcessHandler::OnTestLoadRetryCB(uv_timer_t* timer)
+{
+ auto self = static_cast<cmCTestMultiProcessHandler*>(timer->data);
+ self->StartNextTests();
+}
+
void cmCTestMultiProcessHandler::FinishTestProcess(cmCTestRunTest* runner,
bool started)
{
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 203170e..07a5fe7 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -12,6 +12,7 @@
#include <string>
#include <vector>
+#include "cmUVHandlePtr.h"
#include "cm_uv.h"
class cmCTest;
@@ -101,6 +102,8 @@ protected:
void EraseTest(int index);
void FinishTestProcess(cmCTestRunTest* runner, bool started);
+ static void OnTestLoadRetryCB(uv_timer_t* timer);
+
void RemoveTest(int index);
// Check if we need to resume an interrupted test set
void CheckResume();
@@ -135,7 +138,9 @@ protected:
std::vector<cmCTestTestHandler::cmCTestTestResult>* TestResults;
size_t ParallelLevel; // max number of process that can be run at once
unsigned long TestLoad;
+ unsigned long FakeLoadForTesting;
uv_loop_t Loop;
+ cm::uv_timer_ptr TestLoadRetryTimer;
cmCTestTestHandler* TestHandler;
cmCTest* CTest;
bool HasCycles;
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/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/cmCTest.cxx b/Source/cmCTest.cxx
index e847bae..6639787 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -476,11 +476,13 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
tag.clear();
}
std::string track;
- if (cmSystemTools::GetLineFromStream(tfin, track)) {
+ if (cmSystemTools::GetLineFromStream(tfin, track) &&
+ !this->Parts[PartStart] && !command) {
this->SpecificTrack = track;
}
std::string model;
- if (cmSystemTools::GetLineFromStream(tfin, model)) {
+ if (cmSystemTools::GetLineFromStream(tfin, model) &&
+ !this->Parts[PartStart] && !command) {
this->TestModel = GetTestModelFromString(model.c_str());
}
tfin.close();
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index 650d02d..2b4ceaa 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -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/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index b1f3860..aa17de6 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -279,12 +279,12 @@ cmComputeLinkDepends::Compute()
return this->FinalLinkEntries;
}
-std::map<std::string, int>::iterator cmComputeLinkDepends::AllocateLinkEntry(
- std::string const& item)
+std::map<cmLinkItem, int>::iterator cmComputeLinkDepends::AllocateLinkEntry(
+ cmLinkItem const& item)
{
- std::map<std::string, int>::value_type index_entry(
+ std::map<cmLinkItem, int>::value_type index_entry(
item, static_cast<int>(this->EntryList.size()));
- std::map<std::string, int>::iterator lei =
+ std::map<cmLinkItem, int>::iterator lei =
this->LinkEntryIndex.insert(index_entry).first;
this->EntryList.emplace_back();
this->InferredDependSets.push_back(nullptr);
@@ -295,7 +295,7 @@ std::map<std::string, int>::iterator cmComputeLinkDepends::AllocateLinkEntry(
int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item)
{
// Check if the item entry has already been added.
- std::map<std::string, int>::iterator lei = this->LinkEntryIndex.find(item);
+ std::map<cmLinkItem, int>::iterator lei = this->LinkEntryIndex.find(item);
if (lei != this->LinkEntryIndex.end()) {
// Yes. We do not need to follow the item's dependencies again.
return lei->second;
@@ -307,10 +307,11 @@ int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item)
// Initialize the item entry.
int index = lei->second;
LinkEntry& entry = this->EntryList[index];
- entry.Item = item;
+ entry.Item = item.AsStr();
entry.Target = item.Target;
- entry.IsFlag = (!entry.Target && item[0] == '-' && item[1] != 'l' &&
- item.substr(0, 10) != "-framework");
+ entry.IsFlag =
+ (!entry.Target && entry.Item[0] == '-' && entry.Item[1] != 'l' &&
+ entry.Item.substr(0, 10) != "-framework");
// If the item has dependencies queue it to follow them.
if (entry.Target) {
@@ -395,7 +396,7 @@ void cmComputeLinkDepends::QueueSharedDependencies(
void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
{
// Check if the target already has an entry.
- std::map<std::string, int>::iterator lei =
+ std::map<cmLinkItem, int>::iterator lei =
this->LinkEntryIndex.find(dep.Item);
if (lei == this->LinkEntryIndex.end()) {
// Allocate a spot for the item entry.
@@ -403,7 +404,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
// Initialize the item entry.
LinkEntry& entry = this->EntryList[lei->second];
- entry.Item = dep.Item;
+ entry.Item = dep.Item.AsStr();
entry.Target = dep.Item.Target;
// This item was added specifically because it is a dependent
@@ -473,9 +474,9 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
// If the library is meant for this link type then use it.
if (llt == GENERAL_LibraryType || llt == this->LinkType) {
- actual_libs.emplace_back(d, this->FindTargetToLink(depender_index, d));
+ actual_libs.emplace_back(this->ResolveLinkItem(depender_index, d));
} else if (this->OldLinkDirMode) {
- cmLinkItem item(d, this->FindTargetToLink(depender_index, d));
+ cmLinkItem item = this->ResolveLinkItem(depender_index, d);
this->CheckWrongConfigItem(item);
}
@@ -512,7 +513,7 @@ void cmComputeLinkDepends::AddLinkEntries(int depender_index,
// Skip entries that will resolve to the target getting linked or
// are empty.
cmLinkItem const& item = l;
- if (item == this->Target->GetName() || item.empty()) {
+ if (item.AsStr() == this->Target->GetName() || item.AsStr().empty()) {
continue;
}
@@ -553,8 +554,8 @@ void cmComputeLinkDepends::AddLinkEntries(int depender_index,
}
}
-cmGeneratorTarget const* cmComputeLinkDepends::FindTargetToLink(
- int depender_index, const std::string& name)
+cmLinkItem cmComputeLinkDepends::ResolveLinkItem(int depender_index,
+ const std::string& name)
{
// Look for a target in the scope of the depender.
cmGeneratorTarget const* from = this->Target;
@@ -564,7 +565,7 @@ cmGeneratorTarget const* cmComputeLinkDepends::FindTargetToLink(
from = depender;
}
}
- return from->FindTargetToLink(name);
+ return from->ResolveLinkItem(name);
}
void cmComputeLinkDepends::InferDependencies()
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index dd0e029..66fb1e6 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -72,19 +72,18 @@ private:
std::string Config;
EntryVector FinalLinkEntries;
- std::map<std::string, int>::iterator AllocateLinkEntry(
- std::string const& item);
+ std::map<cmLinkItem, int>::iterator AllocateLinkEntry(
+ cmLinkItem const& item);
int AddLinkEntry(cmLinkItem const& item);
void AddVarLinkEntries(int depender_index, const char* value);
void AddDirectLinkEntries();
template <typename T>
void AddLinkEntries(int depender_index, std::vector<T> const& libs);
- cmGeneratorTarget const* FindTargetToLink(int depender_index,
- const std::string& name);
+ cmLinkItem ResolveLinkItem(int depender_index, const std::string& name);
// One entry for each unique item.
std::vector<LinkEntry> EntryList;
- std::map<std::string, int> LinkEntryIndex;
+ std::map<cmLinkItem, int> LinkEntryIndex;
// BFS of initial dependencies.
struct BFSEntry
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/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index efdd3a5..268e749 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -195,7 +195,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
// dependencies in all targets, because the generated build-systems can't
// deal with config-specific dependencies.
{
- std::set<std::string> emitted;
+ std::set<cmLinkItem> emitted;
std::vector<std::string> configs;
depender->Makefile->GetConfigurations(configs);
@@ -206,27 +206,31 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
std::vector<cmSourceFile const*> objectFiles;
depender->GetExternalObjects(objectFiles, it);
for (cmSourceFile const* o : objectFiles) {
- std::string objLib = o->GetObjectLibrary();
- if (!objLib.empty() && emitted.insert(objLib).second) {
- if (depender->GetType() != cmStateEnums::EXECUTABLE &&
- depender->GetType() != cmStateEnums::STATIC_LIBRARY &&
- depender->GetType() != cmStateEnums::SHARED_LIBRARY &&
- depender->GetType() != cmStateEnums::MODULE_LIBRARY &&
- depender->GetType() != cmStateEnums::OBJECT_LIBRARY) {
- this->GlobalGenerator->GetCMakeInstance()->IssueMessage(
- cmake::FATAL_ERROR,
- "Only executables and libraries may reference target objects.",
- depender->GetBacktrace());
- return;
+ std::string const& objLib = o->GetObjectLibrary();
+ if (!objLib.empty()) {
+ cmLinkItem const& objItem = depender->ResolveLinkItem(objLib);
+ if (emitted.insert(objItem).second) {
+ if (depender->GetType() != cmStateEnums::EXECUTABLE &&
+ depender->GetType() != cmStateEnums::STATIC_LIBRARY &&
+ depender->GetType() != cmStateEnums::SHARED_LIBRARY &&
+ depender->GetType() != cmStateEnums::MODULE_LIBRARY &&
+ depender->GetType() != cmStateEnums::OBJECT_LIBRARY) {
+ this->GlobalGenerator->GetCMakeInstance()->IssueMessage(
+ cmake::FATAL_ERROR,
+ "Only executables and libraries may reference target objects.",
+ depender->GetBacktrace());
+ return;
+ }
+ const_cast<cmGeneratorTarget*>(depender)->Target->AddUtility(
+ objLib);
}
- const_cast<cmGeneratorTarget*>(depender)->Target->AddUtility(objLib);
}
}
cmLinkImplementation const* impl = depender->GetLinkImplementation(it);
// A target should not depend on itself.
- emitted.insert(depender->GetName());
+ emitted.insert(cmLinkItem(depender));
for (cmLinkImplItem const& lib : impl->Libraries) {
// Don't emit the same library twice for this target.
if (emitted.insert(lib).second) {
@@ -240,9 +244,9 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
// Loop over all utility dependencies.
{
std::set<cmLinkItem> const& tutils = depender->GetUtilityItems();
- std::set<std::string> emitted;
+ std::set<cmLinkItem> emitted;
// A target should not depend on itself.
- emitted.insert(depender->GetName());
+ emitted.insert(cmLinkItem(depender));
for (cmLinkItem const& litem : tutils) {
// Don't emit the same utility twice for this target.
if (emitted.insert(litem).second) {
@@ -254,7 +258,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
void cmComputeTargetDepends::AddInterfaceDepends(
int depender_index, const cmGeneratorTarget* dependee,
- const std::string& config, std::set<std::string>& emitted)
+ const std::string& config, std::set<cmLinkItem>& emitted)
{
cmGeneratorTarget const* depender = this->Targets[depender_index];
if (cmLinkInterface const* iface =
@@ -271,7 +275,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(
void cmComputeTargetDepends::AddInterfaceDepends(
int depender_index, cmLinkItem const& dependee_name,
- const std::string& config, std::set<std::string>& emitted)
+ const std::string& config, std::set<cmLinkItem>& emitted)
{
cmGeneratorTarget const* depender = this->Targets[depender_index];
cmGeneratorTarget const* dependee = dependee_name.Target;
@@ -285,7 +289,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(
if (dependee) {
// A target should not depend on itself.
- emitted.insert(depender->GetName());
+ emitted.insert(cmLinkItem(depender));
this->AddInterfaceDepends(depender_index, dependee, config, emitted);
}
}
@@ -324,7 +328,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
<< depender->GetName() << "\" does not exist.";
cmListFileBacktrace const* backtrace =
- depender->GetUtilityBacktrace(dependee_name);
+ depender->GetUtilityBacktrace(dependee_name.AsStr());
if (backtrace) {
cm->IssueMessage(messageType, e.str(), *backtrace);
} else {
diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h
index e93e376..3046e8a 100644
--- a/Source/cmComputeTargetDepends.h
+++ b/Source/cmComputeTargetDepends.h
@@ -51,11 +51,11 @@ private:
bool ComputeFinalDepends(cmComputeComponentGraph const& ccg);
void AddInterfaceDepends(int depender_index, cmLinkItem const& dependee_name,
const std::string& config,
- std::set<std::string>& emitted);
+ std::set<cmLinkItem>& emitted);
void AddInterfaceDepends(int depender_index,
cmGeneratorTarget const* dependee,
const std::string& config,
- std::set<std::string>& emitted);
+ std::set<cmLinkItem>& emitted);
cmGlobalGenerator* GlobalGenerator;
bool DebugMode;
bool NoCycles;
diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx
index bb370c4..3d32b84 100644
--- a/Source/cmExportBuildAndroidMKGenerator.cxx
+++ b/Source/cmExportBuildAndroidMKGenerator.cxx
@@ -108,7 +108,7 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties(
// build type of the makefile
cmGeneratorExpression ge;
cmGeneratorExpressionDAGChecker dagChecker(
- target->GetName(), "INTERFACE_LINK_LIBRARIES", nullptr, nullptr);
+ target, "INTERFACE_LINK_LIBRARIES", nullptr, nullptr);
std::unique_ptr<cmCompiledGeneratorExpression> cge =
ge.Parse(property.second);
std::string evaluated = cge->Evaluate(
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 75d3374..1c5040a 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -831,6 +831,16 @@ void cmExportFileGenerator::SetImportDetailProperties(
}
}
+static std::string const& asString(std::string const& l)
+{
+ return l;
+}
+
+static std::string const& asString(cmLinkItem const& l)
+{
+ return l.AsStr();
+}
+
template <typename T>
void cmExportFileGenerator::SetImportLinkProperty(
std::string const& suffix, cmGeneratorTarget* target,
@@ -850,7 +860,7 @@ void cmExportFileGenerator::SetImportLinkProperty(
link_entries += sep;
sep = ";";
- std::string temp = l;
+ std::string temp = asString(l);
this->AddTargetNamespace(temp, target, missingTargets);
link_entries += temp;
}
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index 87648cb..c169032 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -65,8 +65,7 @@ std::string cmExportTryCompileFileGenerator::FindTargets(
cmGeneratorExpression ge;
- cmGeneratorExpressionDAGChecker dagChecker(tgt->GetName(), propName, nullptr,
- nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(tgt, propName, nullptr, nullptr);
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(prop);
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 14e7927..c4cca07 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -354,8 +354,8 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject(
lg->GetTargetCompileFlags(gtgt, config, language, flags);
// Add source file specific flags.
- cmGeneratorExpressionInterpreter genexInterpreter(lg, gtgt, config,
- gtgt->GetName(), language);
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, config, gtgt,
+ language);
const std::string COMPILE_FLAGS("COMPILE_FLAGS");
if (const char* cflags = source->GetProperty(COMPILE_FLAGS)) {
@@ -381,8 +381,8 @@ std::string cmExtraSublimeTextGenerator::ComputeDefines(
cmMakefile* makefile = lg->GetMakefile();
const std::string& language = source->GetLanguage();
const std::string& config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
- cmGeneratorExpressionInterpreter genexInterpreter(
- lg, target, config, target->GetName(), language);
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, config, target,
+ language);
// Add the export symbol definition for shared library objects.
if (const char* exportMacro = target->GetExportMacro()) {
@@ -419,8 +419,8 @@ std::string cmExtraSublimeTextGenerator::ComputeIncludes(
cmMakefile* makefile = lg->GetMakefile();
const std::string& language = source->GetLanguage();
const std::string& config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
- cmGeneratorExpressionInterpreter genexInterpreter(
- lg, target, config, target->GetName(), language);
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, config, target,
+ language);
// Add include directories for this source file
const std::string INCLUDE_DIRECTORIES("INCLUDE_DIRECTORIES");
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 6823cd5..658e9a7 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -389,14 +389,16 @@ void cmCompiledGeneratorExpression::GetMaxLanguageStandard(
const std::string& cmGeneratorExpressionInterpreter::Evaluate(
const char* expression, const std::string& property)
{
- if (this->Target.empty()) {
- return this->EvaluateExpression(expression);
- }
+ this->CompiledGeneratorExpression =
+ this->GeneratorExpression.Parse(expression);
// Specify COMPILE_OPTIONS to DAGchecker, same semantic as COMPILE_FLAGS
cmGeneratorExpressionDAGChecker dagChecker(
- this->Target, property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property,
- nullptr, nullptr);
+ this->HeadTarget,
+ property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property, nullptr,
+ nullptr);
- return this->EvaluateExpression(expression, &dagChecker);
+ return this->CompiledGeneratorExpression->Evaluate(
+ this->LocalGenerator, this->Config, false, this->HeadTarget, &dagChecker,
+ this->Language);
}
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index 2b7df91..8176d5c 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -160,24 +160,15 @@ class cmGeneratorExpressionInterpreter
public:
cmGeneratorExpressionInterpreter(cmLocalGenerator* localGenerator,
- cmGeneratorTarget* generatorTarget,
- const std::string& config,
- const std::string& target,
- const std::string& lang)
+ std::string const& config,
+ cmGeneratorTarget const* headTarget,
+ std::string const& lang = std::string())
: LocalGenerator(localGenerator)
- , GeneratorTarget(generatorTarget)
, Config(config)
- , Target(target)
+ , HeadTarget(headTarget)
, Language(lang)
{
}
- cmGeneratorExpressionInterpreter(cmLocalGenerator* localGenerator,
- cmGeneratorTarget* generatorTarget,
- const std::string& config)
- : cmGeneratorExpressionInterpreter(localGenerator, generatorTarget, config,
- std::string(), std::string())
- {
- }
const std::string& Evaluate(const char* expression,
const std::string& property);
@@ -188,47 +179,11 @@ public:
}
protected:
- cmGeneratorExpression& GetGeneratorExpression()
- {
- return this->GeneratorExpression;
- }
-
- cmCompiledGeneratorExpression& GetCompiledGeneratorExpression()
- {
- return *(this->CompiledGeneratorExpression);
- }
-
- cmLocalGenerator* GetLocalGenerator() { return this->LocalGenerator; }
-
- cmGeneratorTarget* GetGeneratorTarget() { return this->GeneratorTarget; }
-
- const std::string& GetTargetName() const { return this->Target; }
- const std::string& GetLanguage() const { return this->Language; }
-
- const std::string& EvaluateExpression(
- const char* expression,
- cmGeneratorExpressionDAGChecker* dagChecker = nullptr)
- {
- this->CompiledGeneratorExpression =
- this->GeneratorExpression.Parse(expression);
-
- if (dagChecker == nullptr) {
- return this->CompiledGeneratorExpression->Evaluate(
- this->LocalGenerator, this->Config, false, this->GeneratorTarget);
- }
-
- return this->CompiledGeneratorExpression->Evaluate(
- this->LocalGenerator, this->Config, false, this->GeneratorTarget,
- dagChecker, this->Language);
- }
-
-private:
cmGeneratorExpression GeneratorExpression;
std::unique_ptr<cmCompiledGeneratorExpression> CompiledGeneratorExpression;
cmLocalGenerator* LocalGenerator = nullptr;
- cmGeneratorTarget* GeneratorTarget = nullptr;
std::string Config;
- std::string Target;
+ cmGeneratorTarget const* HeadTarget = nullptr;
std::string Language;
};
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index face282..8d57441 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -14,7 +14,7 @@
#include <utility>
cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
- const cmListFileBacktrace& backtrace, const std::string& target,
+ const cmListFileBacktrace& backtrace, cmGeneratorTarget const* target,
const std::string& property, const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* parent)
: Parent(parent)
@@ -28,7 +28,7 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
}
cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
- const std::string& target, const std::string& property,
+ cmGeneratorTarget const* target, const std::string& property,
const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* parent)
: Parent(parent)
@@ -58,8 +58,8 @@ void cmGeneratorExpressionDAGChecker::Initialize()
TEST_TRANSITIVE_PROPERTY_METHOD) false)) // NOLINT(clang-tidy)
#undef TEST_TRANSITIVE_PROPERTY_METHOD
{
- std::map<std::string, std::set<std::string>>::const_iterator it =
- top->Seen.find(this->Target);
+ std::map<cmGeneratorTarget const*, std::set<std::string>>::const_iterator
+ it = top->Seen.find(this->Target);
if (it != top->Seen.end()) {
const std::set<std::string>& propSet = it->second;
if (propSet.find(this->Property) != propSet.end()) {
@@ -166,7 +166,8 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingGenexExpression()
return top->Property == "TARGET_GENEX_EVAL" || top->Property == "GENEX_EVAL";
}
-bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(const char* tgt)
+bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(
+ cmGeneratorTarget const* tgt)
{
const cmGeneratorExpressionDAGChecker* top = this;
const cmGeneratorExpressionDAGChecker* parent = this->Parent;
@@ -189,7 +190,7 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(const char* tgt)
strcmp(prop, "INTERFACE_LINK_LIBRARIES") == 0;
}
-std::string cmGeneratorExpressionDAGChecker::TopTarget() const
+cmGeneratorTarget const* cmGeneratorExpressionDAGChecker::TopTarget() const
{
const cmGeneratorExpressionDAGChecker* top = this;
const cmGeneratorExpressionDAGChecker* parent = this->Parent;
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index cd23904..8b1697b 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -13,6 +13,7 @@
struct GeneratorExpressionContent;
struct cmGeneratorExpressionContext;
+class cmGeneratorTarget;
#define CM_SELECT_BOTH(F, A1, A2) F(A1, A2)
#define CM_SELECT_FIRST(F, A1, A2) F(A1)
@@ -41,11 +42,11 @@ struct cmGeneratorExpressionContext;
struct cmGeneratorExpressionDAGChecker
{
cmGeneratorExpressionDAGChecker(const cmListFileBacktrace& backtrace,
- const std::string& target,
+ cmGeneratorTarget const* target,
const std::string& property,
const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* parent);
- cmGeneratorExpressionDAGChecker(const std::string& target,
+ cmGeneratorExpressionDAGChecker(cmGeneratorTarget const* target,
const std::string& property,
const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* parent);
@@ -64,7 +65,7 @@ struct cmGeneratorExpressionDAGChecker
const std::string& expr);
bool EvaluatingGenexExpression();
- bool EvaluatingLinkLibraries(const char* tgt = nullptr);
+ bool EvaluatingLinkLibraries(cmGeneratorTarget const* tgt = nullptr);
#define DECLARE_TRANSITIVE_PROPERTY_METHOD(METHOD) bool METHOD() const;
@@ -75,7 +76,7 @@ struct cmGeneratorExpressionDAGChecker
bool GetTransitivePropertiesOnly();
void SetTransitivePropertiesOnly() { this->TransitivePropertiesOnly = true; }
- std::string TopTarget() const;
+ cmGeneratorTarget const* TopTarget() const;
private:
Result CheckGraph() const;
@@ -83,9 +84,9 @@ private:
private:
const cmGeneratorExpressionDAGChecker* const Parent;
- const std::string Target;
+ cmGeneratorTarget const* Target;
const std::string Property;
- std::map<std::string, std::set<std::string>> Seen;
+ std::map<cmGeneratorTarget const*, std::set<std::string>> Seen;
const GeneratorExpressionContent* const Content;
const cmListFileBacktrace Backtrace;
Result CheckResult;
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 9aa5212..1e51f09 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -378,8 +378,8 @@ protected:
{
if (context->HeadTarget) {
cmGeneratorExpressionDAGChecker dagChecker(
- context->Backtrace, context->HeadTarget->GetName(), genexOperator,
- content, dagCheckerParent);
+ context->Backtrace, context->HeadTarget, genexOperator, content,
+ dagCheckerParent);
switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: {
@@ -1196,9 +1196,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
return target->GetLinkerLanguage(context->Config);
}
- cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace,
- target->GetName(), propertyName,
- content, dagCheckerParent);
+ cmGeneratorExpressionDAGChecker dagChecker(
+ context->Backtrace, target, propertyName, content, dagCheckerParent);
switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
@@ -1911,9 +1910,9 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
return std::string();
}
if (dagChecker &&
- (dagChecker->EvaluatingLinkLibraries(name.c_str()) ||
+ (dagChecker->EvaluatingLinkLibraries(target) ||
(dagChecker->EvaluatingSources() &&
- name == dagChecker->TopTarget()))) {
+ target == dagChecker->TopTarget()))) {
::reportError(context, content->GetOriginalExpression(),
"Expressions which require the linker language may not "
"be used while evaluating link libraries");
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 80a99d5..e8e7b90 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -671,9 +671,12 @@ std::set<cmLinkItem> const& cmGeneratorTarget::GetUtilityItems() const
this->UtilityItemsDone = true;
std::set<std::string> const& utilities = this->GetUtilities();
for (std::string const& i : utilities) {
- cmGeneratorTarget* gt =
- this->LocalGenerator->FindGeneratorTargetToUse(i);
- this->UtilityItems.insert(cmLinkItem(i, gt));
+ if (cmGeneratorTarget* gt =
+ this->LocalGenerator->FindGeneratorTargetToUse(i)) {
+ this->UtilityItems.insert(cmLinkItem(gt));
+ } else {
+ this->UtilityItems.insert(cmLinkItem(i));
+ }
}
}
return this->UtilityItems;
@@ -770,7 +773,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(
if (iter == this->SystemIncludesCache.end()) {
cmGeneratorExpressionDAGChecker dagChecker(
- this->GetName(), "SYSTEM_INCLUDE_DIRECTORIES", nullptr, nullptr);
+ this, "SYSTEM_INCLUDE_DIRECTORIES", nullptr, nullptr);
bool excludeImported = this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED");
@@ -816,7 +819,8 @@ static void AddInterfaceEntries(
thisTarget->GetLinkImplementationLibraries(config)) {
for (cmLinkImplItem const& lib : impl->Libraries) {
if (lib.Target) {
- std::string genex = "$<TARGET_PROPERTY:" + lib + "," + prop + ">";
+ std::string genex =
+ "$<TARGET_PROPERTY:" + lib.AsStr() + "," + prop + ">";
cmGeneratorExpression ge(lib.Backtrace);
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(genex);
cge->SetEvaluateForBuildsystem(true);
@@ -836,7 +840,7 @@ static void AddObjectEntries(
for (cmLinkImplItem const& lib : impl->Libraries) {
if (lib.Target &&
lib.Target->GetType() == cmStateEnums::OBJECT_LIBRARY) {
- std::string genex = "$<TARGET_OBJECTS:" + lib + ">";
+ std::string genex = "$<TARGET_OBJECTS:" + lib.AsStr() + ">";
cmGeneratorExpression ge(lib.Backtrace);
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(genex);
cge->SetEvaluateForBuildsystem(true);
@@ -860,7 +864,7 @@ static bool processSources(
for (cmGeneratorTarget::TargetPropertyEntry* entry : entries) {
cmLinkImplItem const& item = entry->LinkImplItem;
- std::string const& targetName = item;
+ std::string const& targetName = item.AsStr();
std::vector<std::string> entrySources;
cmSystemTools::ExpandListArgument(
entry->ge->Evaluate(tgt->GetLocalGenerator(), config, false, tgt, tgt,
@@ -960,8 +964,8 @@ void cmGeneratorTarget::GetSourceFiles(std::vector<std::string>& files,
this->DebugSourcesDone = true;
}
- cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), "SOURCES",
- nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "SOURCES", nullptr,
+ nullptr);
std::unordered_set<std::string> uniqueSrcs;
bool contextDependentDirectSources =
@@ -1756,7 +1760,7 @@ public:
void Visit(cmLinkItem const& item)
{
if (!item.Target) {
- if (item.find("::") != std::string::npos) {
+ if (item.AsStr().find("::") != std::string::npos) {
bool noMessage = false;
cmake::MessageType messageType = cmake::FATAL_ERROR;
std::ostringstream e;
@@ -1777,7 +1781,7 @@ public:
if (!noMessage) {
e << "Target \"" << this->Target->GetName()
- << "\" links to target \"" << item
+ << "\" links to target \"" << item.AsStr()
<< "\" but the target was not found. Perhaps a find_package() "
"call is missing for an IMPORTED target, or an ALIAS target is "
"missing?";
@@ -2074,8 +2078,8 @@ void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string>& result,
}
cmGeneratorExpression ge;
- cmGeneratorExpressionDAGChecker dagChecker(
- this->GetName(), "AUTOUIC_OPTIONS", nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "AUTOUIC_OPTIONS", nullptr,
+ nullptr);
cmSystemTools::ExpandListArgument(
ge.Parse(prop)->Evaluate(this->LocalGenerator, config, false, this,
&dagChecker),
@@ -2477,7 +2481,7 @@ static void processIncludeDirectories(
{
for (cmGeneratorTarget::TargetPropertyEntry* entry : entries) {
cmLinkImplItem const& item = entry->LinkImplItem;
- std::string const& targetName = item;
+ std::string const& targetName = item.AsStr();
bool const fromImported = item.Target && item.Target->IsImported();
bool const checkCMP0027 = item.FromGenex;
std::vector<std::string> entryIncludes;
@@ -2584,8 +2588,8 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories(
std::vector<std::string> includes;
std::unordered_set<std::string> uniqueIncludes;
- cmGeneratorExpressionDAGChecker dagChecker(
- this->GetName(), "INCLUDE_DIRECTORIES", nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "INCLUDE_DIRECTORIES",
+ nullptr, nullptr);
std::vector<std::string> debugProperties;
const char* debugProp =
@@ -2615,7 +2619,7 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories(
cmLinkImplementationLibraries const* impl =
this->GetLinkImplementationLibraries(config);
for (cmLinkImplItem const& lib : impl->Libraries) {
- std::string libDir = cmSystemTools::CollapseFullPath(lib);
+ std::string libDir = cmSystemTools::CollapseFullPath(lib.AsStr());
static cmsys::RegularExpression frameworkCheck(
"(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
@@ -2706,8 +2710,8 @@ void cmGeneratorTarget::GetCompileOptions(std::vector<std::string>& result,
{
std::unordered_set<std::string> uniqueOptions;
- cmGeneratorExpressionDAGChecker dagChecker(
- this->GetName(), "COMPILE_OPTIONS", nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_OPTIONS", nullptr,
+ nullptr);
std::vector<std::string> debugProperties;
const char* debugProp =
@@ -2759,8 +2763,8 @@ void cmGeneratorTarget::GetCompileFeatures(std::vector<std::string>& result,
{
std::unordered_set<std::string> uniqueFeatures;
- cmGeneratorExpressionDAGChecker dagChecker(
- this->GetName(), "COMPILE_FEATURES", nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_FEATURES", nullptr,
+ nullptr);
std::vector<std::string> debugProperties;
const char* debugProp =
@@ -2810,8 +2814,8 @@ void cmGeneratorTarget::GetCompileDefinitions(
{
std::unordered_set<std::string> uniqueOptions;
- cmGeneratorExpressionDAGChecker dagChecker(
- this->GetName(), "COMPILE_DEFINITIONS", nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_DEFINITIONS",
+ nullptr, nullptr);
std::vector<std::string> debugProperties;
const char* debugProp =
@@ -2891,8 +2895,8 @@ void cmGeneratorTarget::GetLinkOptions(std::vector<std::string>& result,
{
std::unordered_set<std::string> uniqueOptions;
- cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), "LINK_OPTIONS",
- nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_OPTIONS", nullptr,
+ nullptr);
std::vector<std::string> debugProperties;
const char* debugProp =
@@ -3039,8 +3043,8 @@ void cmGeneratorTarget::GetStaticLibraryLinkOptions(
std::vector<cmGeneratorTarget::TargetPropertyEntry*> entries;
std::unordered_set<std::string> uniqueOptions;
- cmGeneratorExpressionDAGChecker dagChecker(
- this->GetName(), "STATIC_LIBRARY_OPTIONS", nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "STATIC_LIBRARY_OPTIONS",
+ nullptr, nullptr);
if (const char* linkOptions = this->GetProperty("STATIC_LIBRARY_OPTIONS")) {
std::vector<std::string> options;
@@ -3079,8 +3083,8 @@ void cmGeneratorTarget::GetLinkDepends(std::vector<std::string>& result,
{
std::vector<cmGeneratorTarget::TargetPropertyEntry*> linkDependsEntries;
std::unordered_set<std::string> uniqueOptions;
- cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), "LINK_DEPENDS",
- nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_DEPENDS", nullptr,
+ nullptr);
if (const char* linkDepends = this->GetProperty("LINK_DEPENDS")) {
std::vector<std::string> depends;
@@ -4495,7 +4499,7 @@ void cmGeneratorTarget::LookupLinkItems(std::vector<std::string> const& names,
if (name == this->GetName() || name.empty()) {
continue;
}
- items.emplace_back(name, this->FindTargetToLink(name));
+ items.push_back(this->ResolveLinkItem(name));
}
}
@@ -4505,8 +4509,7 @@ void cmGeneratorTarget::ExpandLinkItems(
std::vector<cmLinkItem>& items, bool& hadHeadSensitiveCondition) const
{
cmGeneratorExpression ge;
- cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), prop, nullptr,
- nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, prop, nullptr, nullptr);
// The $<LINK_ONLY> expression may be in a link interface to specify private
// link dependencies that are otherwise excluded from usage requirements.
if (usage_requirements_only) {
@@ -4571,7 +4574,7 @@ void cmGeneratorTarget::ComputeLinkInterface(
this->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
// Shared libraries may have runtime implementation dependencies
// on other shared libraries that are not in the interface.
- std::unordered_set<std::string> emitted;
+ std::set<cmLinkItem> emitted;
for (cmLinkItem const& lib : iface.Libraries) {
emitted.insert(lib);
}
@@ -5557,8 +5560,8 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
end = entryRange.end();
le != end; ++le, ++btIt) {
std::vector<std::string> llibs;
- cmGeneratorExpressionDAGChecker dagChecker(
- this->GetName(), "LINK_LIBRARIES", nullptr, nullptr);
+ cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_LIBRARIES", nullptr,
+ nullptr);
cmGeneratorExpression ge(*btIt);
std::unique_ptr<cmCompiledGeneratorExpression> const cge = ge.Parse(*le);
std::string const& evaluated =
@@ -5603,7 +5606,7 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
}
// The entry is meant for this configuration.
- impl.Libraries.emplace_back(name, this->FindTargetToLink(name), *btIt,
+ impl.Libraries.emplace_back(this->ResolveLinkItem(name), *btIt,
evaluated != *le);
}
@@ -5631,14 +5634,12 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
continue;
}
// Support OLD behavior for CMP0003.
- impl.WrongConfigLibraries.emplace_back(name,
- this->FindTargetToLink(name));
+ impl.WrongConfigLibraries.push_back(this->ResolveLinkItem(name));
}
}
}
-cmGeneratorTarget* cmGeneratorTarget::FindTargetToLink(
- std::string const& name) const
+cmLinkItem cmGeneratorTarget::ResolveLinkItem(std::string const& name) const
{
cmGeneratorTarget* tgt =
this->LocalGenerator->FindGeneratorTargetToUse(name);
@@ -5651,7 +5652,11 @@ cmGeneratorTarget* cmGeneratorTarget::FindTargetToLink(
tgt = nullptr;
}
- return tgt;
+ if (tgt) {
+ return cmLinkItem(tgt);
+ }
+
+ return cmLinkItem(name);
}
std::string cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 1030d91..a847e21 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -357,7 +357,7 @@ public:
cmOptionalLinkImplementation& impl,
const cmGeneratorTarget* head) const;
- cmGeneratorTarget* FindTargetToLink(std::string const& name) const;
+ cmLinkItem ResolveLinkItem(std::string const& name) const;
// Compute the set of languages compiled by the target. This is
// computed every time it is called because the languages can change
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7456d3c..e353a37 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -751,11 +751,10 @@ class XCodeGeneratorExpressionInterpreter
public:
XCodeGeneratorExpressionInterpreter(cmSourceFile* sourceFile,
cmLocalGenerator* localGenerator,
- cmGeneratorTarget* generatorTarget,
+ cmGeneratorTarget* headTarget,
const std::string& lang)
- : cmGeneratorExpressionInterpreter(localGenerator, generatorTarget,
- "NO-PER-CONFIG-SUPPORT-IN-XCODE",
- generatorTarget->GetName(), lang)
+ : cmGeneratorExpressionInterpreter(
+ localGenerator, "NO-PER-CONFIG-SUPPORT-IN-XCODE", headTarget, lang)
, SourceFile(sourceFile)
{
}
@@ -767,8 +766,7 @@ public:
{
const std::string& processed =
this->cmGeneratorExpressionInterpreter::Evaluate(expression, property);
- if (this->GetCompiledGeneratorExpression()
- .GetHadContextSensitiveCondition()) {
+ if (this->CompiledGeneratorExpression->GetHadContextSensitiveCondition()) {
std::ostringstream e;
/* clang-format off */
e <<
@@ -777,7 +775,7 @@ public:
"specified for source:\n"
" " << this->SourceFile->GetFullPath() << "\n";
/* clang-format on */
- this->GetLocalGenerator()->IssueMessage(cmake::FATAL_ERROR, e.str());
+ this->LocalGenerator->IssueMessage(cmake::FATAL_ERROR, e.str());
}
return processed;
diff --git a/Source/cmLinkItem.cxx b/Source/cmLinkItem.cxx
new file mode 100644
index 0000000..69b6821
--- /dev/null
+++ b/Source/cmLinkItem.cxx
@@ -0,0 +1,72 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#include "cmLinkItem.h"
+
+#include "cmGeneratorTarget.h"
+
+#include <utility> // IWYU pragma: keep
+
+cmLinkItem::cmLinkItem()
+ : String()
+ , Target(nullptr)
+{
+}
+
+cmLinkItem::cmLinkItem(std::string const& n)
+ : String(n)
+ , Target(nullptr)
+{
+}
+
+cmLinkItem::cmLinkItem(cmGeneratorTarget const* t)
+ : String()
+ , Target(t)
+{
+}
+
+std::string const& cmLinkItem::AsStr() const
+{
+ return this->Target ? this->Target->GetName() : this->String;
+}
+
+bool operator<(cmLinkItem const& l, cmLinkItem const& r)
+{
+ // Order among targets.
+ if (l.Target && r.Target) {
+ return l.Target < r.Target;
+ }
+ // Order targets before strings.
+ if (l.Target) {
+ return true;
+ }
+ if (r.Target) {
+ return false;
+ }
+ // Order among strings.
+ return l.String < r.String;
+}
+
+bool operator==(cmLinkItem const& l, cmLinkItem const& r)
+{
+ return l.Target == r.Target && l.String == r.String;
+}
+
+std::ostream& operator<<(std::ostream& os, cmLinkItem const& item)
+{
+ return os << item.AsStr();
+}
+
+cmLinkImplItem::cmLinkImplItem()
+ : cmLinkItem()
+ , Backtrace()
+ , FromGenex(false)
+{
+}
+
+cmLinkImplItem::cmLinkImplItem(cmLinkItem item, cmListFileBacktrace const& bt,
+ bool fromGenex)
+ : cmLinkItem(std::move(item))
+ , Backtrace(bt)
+ , FromGenex(fromGenex)
+{
+}
diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h
index e8c9487..74fd298 100644
--- a/Source/cmLinkItem.h
+++ b/Source/cmLinkItem.h
@@ -7,6 +7,7 @@
#include <algorithm>
#include <map>
+#include <ostream>
#include <string>
#include <vector>
@@ -17,40 +18,27 @@
class cmGeneratorTarget;
// Basic information about each link item.
-class cmLinkItem : public std::string
+class cmLinkItem
{
- typedef std::string std_string;
+ std::string String;
public:
- cmLinkItem()
- : std_string()
- , Target(nullptr)
- {
- }
- cmLinkItem(const std_string& n, cmGeneratorTarget const* t)
- : std_string(n)
- , Target(t)
- {
- }
+ cmLinkItem();
+ explicit cmLinkItem(std::string const& s);
+ explicit cmLinkItem(cmGeneratorTarget const* t);
+ std::string const& AsStr() const;
cmGeneratorTarget const* Target;
+ friend bool operator<(cmLinkItem const& l, cmLinkItem const& r);
+ friend bool operator==(cmLinkItem const& l, cmLinkItem const& r);
+ friend std::ostream& operator<<(std::ostream& os, cmLinkItem const& item);
};
class cmLinkImplItem : public cmLinkItem
{
public:
- cmLinkImplItem()
- : cmLinkItem()
- , Backtrace()
- , FromGenex(false)
- {
- }
- cmLinkImplItem(std::string const& n, cmGeneratorTarget const* t,
- cmListFileBacktrace const& bt, bool fromGenex)
- : cmLinkItem(n, t)
- , Backtrace(bt)
- , FromGenex(fromGenex)
- {
- }
+ cmLinkImplItem();
+ cmLinkImplItem(cmLinkItem item, cmListFileBacktrace const& bt,
+ bool fromGenex);
cmListFileBacktrace Backtrace;
bool FromGenex;
};
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/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 13bd214..c05b085 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1497,8 +1497,7 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
lang = sourceLang;
}
- cmGeneratorExpressionInterpreter genexInterpreter(lg, gt, *i,
- gt->GetName(), lang);
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, *i, gt, lang);
bool needfc = false;
if (!objectName.empty()) {
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index e8cf255..c8dc392 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -434,8 +434,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
std::string config = this->LocalGenerator->GetConfigName();
std::string configUpper = cmSystemTools::UpperCase(config);
cmGeneratorExpressionInterpreter genexInterpreter(
- this->LocalGenerator, this->GeneratorTarget, config,
- this->GeneratorTarget->GetName(), lang);
+ this->LocalGenerator, config, this->GeneratorTarget, lang);
// Add Fortran format flags.
if (lang == "Fortran") {
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.cxx b/Source/cmNinjaTargetGenerator.cxx
index 1cfaac5..ebcc501 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -136,9 +136,8 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject(
// Add source file specific flags.
cmGeneratorExpressionInterpreter genexInterpreter(
- this->LocalGenerator, this->GeneratorTarget,
- this->LocalGenerator->GetConfigName(), this->GeneratorTarget->GetName(),
- language);
+ this->LocalGenerator, this->LocalGenerator->GetConfigName(),
+ this->GeneratorTarget, language);
const std::string COMPILE_FLAGS("COMPILE_FLAGS");
if (const char* cflags = source->GetProperty(COMPILE_FLAGS)) {
@@ -188,8 +187,7 @@ std::string cmNinjaTargetGenerator::ComputeDefines(cmSourceFile const* source,
std::set<std::string> defines;
const std::string config = this->LocalGenerator->GetConfigName();
cmGeneratorExpressionInterpreter genexInterpreter(
- this->LocalGenerator, this->GeneratorTarget, config,
- this->GeneratorTarget->GetName(), language);
+ this->LocalGenerator, config, this->GeneratorTarget, language);
const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS");
if (const char* compile_defs = source->GetProperty(COMPILE_DEFINITIONS)) {
@@ -217,8 +215,7 @@ std::string cmNinjaTargetGenerator::ComputeIncludes(
std::vector<std::string> includes;
const std::string config = this->LocalGenerator->GetConfigName();
cmGeneratorExpressionInterpreter genexInterpreter(
- this->LocalGenerator, this->GeneratorTarget, config,
- this->GeneratorTarget->GetName(), language);
+ this->LocalGenerator, config, this->GeneratorTarget, language);
const std::string INCLUDE_DIRECTORIES("INCLUDE_DIRECTORIES");
if (const char* cincludes = source->GetProperty(INCLUDE_DIRECTORIES)) {
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 0ed3953..2cad657 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -722,8 +722,8 @@ static void PopulateFileGroupData(
? languageDataMap.at(kInterfaceSourcesLanguageDataKey)
: languageDataMap.at(fileData.Language);
cmLocalGenerator* lg = target->GetLocalGenerator();
- cmGeneratorExpressionInterpreter genexInterpreter(
- lg, target, config, target->GetName(), fileData.Language);
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, config, target,
+ fileData.Language);
std::string compileFlags = ld.Flags;
const std::string COMPILE_FLAGS("COMPILE_FLAGS");
@@ -817,7 +817,7 @@ static Json::Value DumpSourceFilesList(
auto targetProp = target->Target->GetProperty("INTERFACE_SOURCES");
if (targetProp != nullptr) {
cmGeneratorExpressionInterpreter genexInterpreter(
- target->GetLocalGenerator(), target, config, target->GetName(), "");
+ target->GetLocalGenerator(), config, target);
auto evaluatedSources = cmsys::SystemTools::SplitString(
genexInterpreter.Evaluate(targetProp, "INTERFACE_SOURCES"), ';');
@@ -977,8 +977,7 @@ static void CreateInterfaceSourcesEntry(
LanguageData& ld = languageDataMap[kInterfaceSourcesLanguageDataKey];
ld.Language = "";
- cmGeneratorExpressionInterpreter genexInterpreter(lg, target, config,
- target->GetName(), "");
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, config, target);
std::vector<std::string> propertyValue;
GetTargetProperty(genexInterpreter, target, "INTERFACE_INCLUDE_DIRECTORIES",
propertyValue);
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 9e74335..53a2a59 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2117,8 +2117,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
flagtable = gg->GetCSharpFlagTable();
}
cmGeneratorExpressionInterpreter genexInterpreter(
- this->LocalGenerator, this->GeneratorTarget, config,
- this->GeneratorTarget->GetName(), lang);
+ this->LocalGenerator, config, this->GeneratorTarget, lang);
cmVS10GeneratorOptions clOptions(
this->LocalGenerator, cmVisualStudioGeneratorOptions::Compiler,
flagtable, this);
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 971d7ff..a22521b 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -396,6 +396,7 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(CompatibleInterface CompatibleInterface)
ADD_TEST_MACRO(AliasTarget AliasTarget)
ADD_TEST_MACRO(StagingPrefix StagingPrefix)
+ ADD_TEST_MACRO(ImportedSameName ImportedSameName)
ADD_TEST_MACRO(InterfaceLibrary InterfaceLibrary)
if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]")
set(ConfigSources_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
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/ImportedSameName/A/CMakeLists.txt b/Tests/ImportedSameName/A/CMakeLists.txt
new file mode 100644
index 0000000..0a31b40
--- /dev/null
+++ b/Tests/ImportedSameName/A/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_library(a STATIC a.c)
+target_compile_definitions(a INTERFACE DEF_A)
+
+add_library(sameName INTERFACE IMPORTED)
+target_link_libraries(sameName INTERFACE a)
+
+add_library(ifaceA INTERFACE)
+target_link_libraries(ifaceA INTERFACE sameName)
diff --git a/Tests/ImportedSameName/A/a.c b/Tests/ImportedSameName/A/a.c
new file mode 100644
index 0000000..4ef3698
--- /dev/null
+++ b/Tests/ImportedSameName/A/a.c
@@ -0,0 +1,3 @@
+void a(void)
+{
+}
diff --git a/Tests/ImportedSameName/B/CMakeLists.txt b/Tests/ImportedSameName/B/CMakeLists.txt
new file mode 100644
index 0000000..d930326
--- /dev/null
+++ b/Tests/ImportedSameName/B/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_library(b STATIC b.c)
+target_compile_definitions(b INTERFACE DEF_B)
+
+add_library(sameName INTERFACE IMPORTED)
+target_link_libraries(sameName INTERFACE b)
+
+add_library(ifaceB INTERFACE)
+target_link_libraries(ifaceB INTERFACE sameName)
diff --git a/Tests/ImportedSameName/B/b.c b/Tests/ImportedSameName/B/b.c
new file mode 100644
index 0000000..c7c7df4
--- /dev/null
+++ b/Tests/ImportedSameName/B/b.c
@@ -0,0 +1,3 @@
+void b(void)
+{
+}
diff --git a/Tests/ImportedSameName/CMakeLists.txt b/Tests/ImportedSameName/CMakeLists.txt
new file mode 100644
index 0000000..4292c12
--- /dev/null
+++ b/Tests/ImportedSameName/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 3.12)
+project(ImportedSameName C)
+
+add_subdirectory(A)
+add_subdirectory(B)
+
+add_executable(ImportedSameName main.c)
+target_link_libraries(ImportedSameName PRIVATE ifaceA ifaceB)
diff --git a/Tests/ImportedSameName/main.c b/Tests/ImportedSameName/main.c
new file mode 100644
index 0000000..a0cb27f
--- /dev/null
+++ b/Tests/ImportedSameName/main.c
@@ -0,0 +1,16 @@
+#ifndef DEF_A
+# error "DEF_A not defined"
+#endif
+#ifndef DEF_B
+# error "DEF_B not defined"
+#endif
+
+extern void a(void);
+extern void b(void);
+
+int main(void)
+{
+ a();
+ b();
+ return 0;
+}
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index 3033c9c..9e8d050 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -111,8 +111,8 @@ endfunction()
set(ENV{__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING} 5)
# Verify that new tests are not started when the load average exceeds
-# our threshold.
-run_TestLoad(test-load-fail 2)
+# our threshold and that they then run once the load average drops.
+run_TestLoad(test-load-wait 3)
# Verify that warning message is displayed but tests still start when
# an invalid argument is given.
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt b/Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt
deleted file mode 100644
index eafba1c..0000000
--- a/Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-No tests were found!!!
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt b/Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt
deleted file mode 100644
index 153da09..0000000
--- a/Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
-\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 2, Smallest test TestLoad[1-2] requires 1\*\*\*\*\*
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt b/Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt
deleted file mode 100644
index 10f3293..0000000
--- a/Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^$
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt b/Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt
new file mode 100644
index 0000000..11a768a
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt
@@ -0,0 +1,8 @@
+^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
+\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 3, Smallest test TestLoad[1-2] requires 1\*\*\*\*\*
+ Start 1: TestLoad1
+ Start 2: TestLoad2
+1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+2/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 2
diff --git a/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt b/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt
new file mode 100644
index 0000000..4a6f1e9
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt
@@ -0,0 +1,8 @@
+Run dashboard with model Experimental
+ Source directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack
+ Build directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-build
+ Track: ExperimentalDifferent
+ Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack/CTestConfig.cmake
+ Site: test-site
+ Build name: test-build-name
+ Use ExperimentalDifferent tag: [0-9-]+
diff --git a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
index 2e8aa75..9b57b1b 100644
--- a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
@@ -30,6 +30,7 @@ run_ctest_start(AppendSameModel Continuous APPEND)
run_ctest_start(AppendDifferentModel Experimental APPEND)
run_ctest_start(AppendNoModel APPEND)
run_ctest_start(AppendDifferentTrack TRACK ExperimentalDifferent APPEND)
+run_ctest_start(NoAppendDifferentTrack Experimental TRACK ExperimentalDifferent)
run_ctest_start(AppendNoMatchingTrack Continuous APPEND)
run_ctest_start(AppendOldContinuous Continuous APPEND)
run_ctest_start(AppendOldNoModel APPEND)
diff --git a/Tests/RunCMake/ctest_start/test.cmake.in b/Tests/RunCMake/ctest_start/test.cmake.in
index 172baf7..8cd3cff 100644
--- a/Tests/RunCMake/ctest_start/test.cmake.in
+++ b/Tests/RunCMake/ctest_start/test.cmake.in
@@ -14,7 +14,7 @@ function(setup_tests)
ctest_start(${ctest_start_args})
endfunction()
-if("@CASE_NAME@" MATCHES "^Append")
+if("@CASE_NAME@" MATCHES "^(No)?Append")
if("@CASE_NAME@" MATCHES "^AppendNoMatchingTrack$")
file(WRITE "${CTEST_BINARY_DIRECTORY}/Testing/TAG" "19551112-2204\nSomeWeirdTrackName\n")
else()
diff --git a/Tests/RunCMake/ctest_test/CTestTestLoadFail-result.txt b/Tests/RunCMake/ctest_test/CTestTestLoadFail-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_test/CTestTestLoadFail-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_test/CTestTestLoadFail-stderr.txt b/Tests/RunCMake/ctest_test/CTestTestLoadFail-stderr.txt
deleted file mode 100644
index eafba1c..0000000
--- a/Tests/RunCMake/ctest_test/CTestTestLoadFail-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-No tests were found!!!
diff --git a/Tests/RunCMake/ctest_test/CTestTestLoadFail-stdout.txt b/Tests/RunCMake/ctest_test/CTestTestLoadFail-stdout.txt
deleted file mode 100644
index e203c10..0000000
--- a/Tests/RunCMake/ctest_test/CTestTestLoadFail-stdout.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Test project .*/Tests/RunCMake/ctest_test/CTestTestLoadFail-build
-\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 4, Smallest test RunCMakeVersion requires 1\*\*\*\*\*$
diff --git a/Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt b/Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt
new file mode 100644
index 0000000..2af3838
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt
@@ -0,0 +1,8 @@
+Test project .*/Tests/RunCMake/ctest_test/CTestTestLoadWait-build
+\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 4, Smallest test RunCMakeVersion requires 1\*\*\*\*\*
+ Start 1: RunCMakeVersion
+1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 1
++
+Total Test time \(real\) = +[0-9.]+ sec$
diff --git a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
index 1b31726..6877e6a 100644
--- a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
@@ -21,8 +21,8 @@ set(ENV{__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING} 5)
run_ctest_test(TestLoadPass TEST_LOAD 6)
# Verify that new tests are not started when the load average exceeds
-# our threshold.
-run_ctest_test(TestLoadFail TEST_LOAD 2)
+# our threshold and that they then run once the load average drops.
+run_ctest_test(TestLoadWait TEST_LOAD 2)
# Verify that when an invalid "TEST_LOAD" value is given, a warning
# message is displayed and the value is ignored.
@@ -34,9 +34,9 @@ set(CASE_CTEST_TEST_LOAD 7)
run_ctest_test(CTestTestLoadPass)
# Verify that new tests are not started when the load average exceeds
-# our threshold.
+# our threshold and that they then run once the load average drops.
set(CASE_CTEST_TEST_LOAD 4)
-run_ctest_test(CTestTestLoadFail)
+run_ctest_test(CTestTestLoadWait)
# Verify that when an invalid "CTEST_TEST_LOAD" value is given,
# a warning message is displayed and the value is ignored.
diff --git a/Tests/RunCMake/ctest_test/TestLoadFail-result.txt b/Tests/RunCMake/ctest_test/TestLoadFail-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_test/TestLoadFail-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_test/TestLoadFail-stderr.txt b/Tests/RunCMake/ctest_test/TestLoadFail-stderr.txt
deleted file mode 100644
index eafba1c..0000000
--- a/Tests/RunCMake/ctest_test/TestLoadFail-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-No tests were found!!!
diff --git a/Tests/RunCMake/ctest_test/TestLoadFail-stdout.txt b/Tests/RunCMake/ctest_test/TestLoadFail-stdout.txt
deleted file mode 100644
index 4d7ce48..0000000
--- a/Tests/RunCMake/ctest_test/TestLoadFail-stdout.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Test project .*/Tests/RunCMake/ctest_test/TestLoadFail-build
-\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 2, Smallest test RunCMakeVersion requires 1\*\*\*\*\*$
diff --git a/Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt b/Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt
new file mode 100644
index 0000000..07f4ed3
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt
@@ -0,0 +1,8 @@
+Test project .*/Tests/RunCMake/ctest_test/TestLoadWait-build
+\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 2, Smallest test RunCMakeVersion requires 1\*\*\*\*\*
+ Start 1: RunCMakeVersion
+1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 1
++
+Total Test time \(real\) = +[0-9.]+ sec$
diff --git a/bootstrap b/bootstrap
index 0b49b74..188193d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -352,6 +352,7 @@ CMAKE_CXX_SOURCES="\
cmInstallTargetsCommand \
cmInstalledFile \
cmLinkDirectoriesCommand \
+ cmLinkItem \
cmLinkLineComputer \
cmListCommand \
cmListFileCache \