summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/string.rst2
-rw-r--r--Help/manual/cmake-language.7.rst2
-rw-r--r--Help/manual/cmake-toolchains.7.rst10
-rw-r--r--Help/manual/ctest.1.rst48
-rw-r--r--Help/release/3.28.rst6
-rw-r--r--Modules/ExternalProject.cmake14
-rw-r--r--Modules/FeatureSummary.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmDyndepCollation.cxx3
-rw-r--r--Source/cmNinjaTargetGenerator.cxx22
-rw-r--r--Source/cmNinjaTargetGenerator.h2
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPre2017-check.cmake2
12 files changed, 58 insertions, 57 deletions
diff --git a/Help/command/string.rst b/Help/command/string.rst
index 0e69b27..2f01653 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -22,7 +22,7 @@ Synopsis
string(`JOIN`_ <glue> <out-var> [<input>...])
string(`TOLOWER`_ <string> <out-var>)
string(`TOUPPER`_ <string> <out-var>)
- string(`LENGTH`_ <string> <out-var>)
+ string(`LENGTH <LENGTH_>`_ <string> <out-var>)
string(`SUBSTRING`_ <string> <begin> <length> <out-var>)
string(`STRIP`_ <string> <out-var>)
string(`GENEX_STRIP`_ <string> <out-var>)
diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst
index d0774cb..dba953d 100644
--- a/Help/manual/cmake-language.7.rst
+++ b/Help/manual/cmake-language.7.rst
@@ -224,7 +224,7 @@ For example::
They interpret the opening bracket as the start of an
`Unquoted Argument`_.
-.. _`Lua`: http://www.lua.org/
+.. _`Lua`: https://www.lua.org/
.. _`Quoted Argument`:
diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst
index e32bd29..1ebdf85 100644
--- a/Help/manual/cmake-toolchains.7.rst
+++ b/Help/manual/cmake-toolchains.7.rst
@@ -583,7 +583,7 @@ generator is recommended. The :generator:`Unix Makefiles` or
:generator:`Ninja` generators can also be used, but they require the
project to handle more areas like target CPU selection and code signing.
-Any of the three systems can be targeted by setting the
+Any of the Apple device platforms can be targeted by setting the
:variable:`CMAKE_SYSTEM_NAME` variable to a value from the table below.
By default, the latest Device SDK is chosen. As for all Apple platforms,
a different SDK (e.g. a simulator) can be selected by setting the
@@ -611,9 +611,11 @@ Variable :variable:`CMAKE_OSX_ARCHITECTURES` can be used to set architectures
for both device and simulator. Variable :variable:`CMAKE_OSX_DEPLOYMENT_TARGET`
can be used to set an iOS/tvOS/visionOS/watchOS deployment target.
-Next configuration will install fat 5 architectures iOS library
-and add the ``-miphoneos-version-min=9.3``/``-mios-simulator-version-min=9.3``
-flags to the compiler:
+The next example installs five architectures in a universal binary for an iOS
+library. It adds the relevant ``-miphoneos-version-min=9.3`` or
+``-mios-simulator-version-min=9.3`` compiler flag where appropriate.
+Note that the :variable:`CMAKE_IOS_INSTALL_COMBINED` variable used in the
+example is now deprecated, so this approach is no longer recommended.
.. code-block:: console
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index b519ccf..0917191 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -1594,17 +1594,20 @@ that running several of these tests at once does not exhaust the GPU's memory
pool.
Please note that CTest has no concept of what a GPU is or how much memory it
-has, nor does it have any way of communicating with a GPU to retrieve this
-information or perform any memory management. CTest simply keeps track of a
-list of abstract resource types, each of which has a certain number of slots
-available for tests to use. Each test specifies the number of slots that it
-requires from a certain resource, and CTest then schedules them in a way that
-prevents the total number of slots in use from exceeding the listed capacity.
-When a test is executed, and slots from a resource are allocated to that test,
-tests may assume that they have exclusive use of those slots for the duration
-of the test's process.
-
-The CTest resource allocation feature consists of two inputs:
+has. It does not have any way of communicating with a GPU to retrieve this
+information or perform any memory management, although the project can define
+a test that provides details about the test machine (see
+:ref:`ctest-resource-dynamically-generated-spec-file`).
+
+CTest keeps track of a list of abstract resource types, each of which has a
+certain number of slots available for tests to use. Each test specifies the
+number of slots that it requires from a certain resource, and CTest then
+schedules them in a way that prevents the total number of slots in use from
+exceeding the listed capacity. When a test is executed, and slots from a
+resource are allocated to that test, tests may assume that they have exclusive
+use of those slots for the duration of the test's process.
+
+The CTest resource allocation feature consists of at least two inputs:
* The :ref:`resource specification file <ctest-resource-specification-file>`,
described below, which describes the resources available on the system.
@@ -1645,15 +1648,20 @@ properties to indicate a skipped test.
Resource Specification File
---------------------------
-The resource specification file is a JSON file which is passed to CTest, either
-on the command line as :option:`ctest --resource-spec-file`, or as the
-``RESOURCE_SPEC_FILE`` argument of :command:`ctest_test`. If a dashboard script
-is used and ``RESOURCE_SPEC_FILE`` is not specified, the value of
-:variable:`CTEST_RESOURCE_SPEC_FILE` in the dashboard script is used instead.
-If :option:`--resource-spec-file <ctest --resource-spec-file>`, ``RESOURCE_SPEC_FILE``,
-and :variable:`CTEST_RESOURCE_SPEC_FILE` in the dashboard script are not specified,
-the value of :variable:`CTEST_RESOURCE_SPEC_FILE` in the CMake build is used
-instead. If none of these are specified, no resource spec file is used.
+The resource specification file is a JSON file which is passed to CTest in one
+of a number of ways. It can be specified on the command line with the
+:option:`ctest --resource-spec-file` option, it can be given using the
+``RESOURCE_SPEC_FILE`` argument of :command:`ctest_test`, or it can be
+generated dynamically as part of test execution (see
+:ref:`ctest-resource-dynamically-generated-spec-file`).
+
+If a dashboard script is used and ``RESOURCE_SPEC_FILE`` is not specified, the
+value of :variable:`CTEST_RESOURCE_SPEC_FILE` in the dashboard script is used
+instead. If :option:`--resource-spec-file <ctest --resource-spec-file>`,
+``RESOURCE_SPEC_FILE``, and :variable:`CTEST_RESOURCE_SPEC_FILE` in the
+dashboard script are not specified, the value of
+:variable:`CTEST_RESOURCE_SPEC_FILE` in the CMake build is used instead.
+If none of these are specified, no resource spec file is used.
The resource specification file must be a JSON object. All examples in this
document assume the following resource specification file:
diff --git a/Help/release/3.28.rst b/Help/release/3.28.rst
index f002cd2..d28024f 100644
--- a/Help/release/3.28.rst
+++ b/Help/release/3.28.rst
@@ -116,12 +116,6 @@ Modules
Additionally, the :command:`ExternalProject_Add_Step` command
has been updated to support the new ``JOB_SERVER_AWARE`` option.
-* The :module:`ExternalProject` module now declares ``BYPRODUCTS`` for the
- downloaded file for generated ``download`` steps. Previously, if multiple
- external projects downloaded to the same file, hash verification could fail.
- Now, when using the :ref:`Ninja Generators`, this scenario is detected and
- Ninja will raise an error stating that multiple rules generate the same file.
-
* The :module:`FetchContent` module's :command:`FetchContent_Declare` command
gained an ``EXCLUDE_FROM_ALL`` option, which propagates through to the
:command:`add_subdirectory` call made by
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index b2816a5..757b04e 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2836,7 +2836,6 @@ function(_ep_add_download_command name)
set(comment)
set(work_dir)
set(extra_repo_info)
- set(byproduct_file)
if(cmd_set)
set(work_dir ${download_dir})
@@ -3117,16 +3116,14 @@ hash=${hash}
get_filename_component(fname "${fname}" NAME)
else()
# Fall back to a default file name. The actual file name does not
- # matter as long as it doesn't conflict with other projects because
- # it is used only internally and our extraction tool inspects the
- # file content directly. If it turns out the wrong URL was given
- # that will be revealed during the build which is an easier place for
- # users to diagnose than an error here anyway.
- set(fname "${name}-archive.tar")
+ # matter because it is used only internally and our extraction tool
+ # inspects the file content directly. If it turns out the wrong URL
+ # was given that will be revealed during the build which is an easier
+ # place for users to diagnose than an error here anyway.
+ set(fname "archive.tar")
endif()
string(REPLACE ";" "-" fname "${fname}")
set(file ${download_dir}/${fname})
- set(byproduct_file "${download_dir}/${fname}")
get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)
get_property(inactivity_timeout
TARGET ${name}
@@ -3303,7 +3300,6 @@ hash=${hash}
COMMAND ${__cmdQuoted}
WORKING_DIRECTORY \${work_dir}
DEPENDS \${depends}
- BYPRODUCTS \${byproduct_file}
DEPENDEES mkdir
${log}
${uses_terminal}
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 77c66d1..009ca38 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -17,7 +17,7 @@ packages and/or feature for a build tree such as::
PNG, A PNG image library., <http://www.libpng.org/pub/png/>
* Enables saving screenshots
-- The following OPTIONAL packages have not been found:
- Lua51, The Lua scripting language., <http://www.lua.org>
+ Lua51, The Lua scripting language., <https://www.lua.org>
* Enables macros in MyWordProcessor
Foo, Foo provides cool stuff.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 21ceb24..eda95c1 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 28)
-set(CMake_VERSION_PATCH 20231223)
+set(CMake_VERSION_PATCH 20240104)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/cmDyndepCollation.cxx b/Source/cmDyndepCollation.cxx
index e9f7be3..ea46f03 100644
--- a/Source/cmDyndepCollation.cxx
+++ b/Source/cmDyndepCollation.cxx
@@ -495,7 +495,8 @@ bool cmDyndepCollation::WriteDyndepMetadata(
if (!has_provides) {
cmSystemTools::Error(
cmStrCat("Output ", object.PrimaryOutput,
- " is of type `CXX_MODULES` but does not provide a module"));
+ " is of type `CXX_MODULES` but does not provide a module "
+ "interface unit or partition"));
result = false;
continue;
}
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 2cb1284..7ea479e 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -1390,8 +1390,10 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
bool const needDyndep = !isPch &&
this->GeneratorTarget->NeedDyndepForSource(language, config, source);
- cmNinjaBuild objBuild(this->LanguageCompilerRule(
- language, config, needDyndep ? WithScanning::Yes : WithScanning::No));
+ WithScanning withScanning =
+ needDyndep ? WithScanning::Yes : WithScanning::No;
+ cmNinjaBuild objBuild(
+ this->LanguageCompilerRule(language, config, withScanning));
cmNinjaVars& vars = objBuild.Variables;
vars["FLAGS"] =
this->ComputeFlagsForObject(source, language, config, objectFileName);
@@ -1454,7 +1456,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
this->ExportObjectCompileCommand(
language, sourceFilePath, objectDir, objectFileName, objectFileDir,
vars["FLAGS"], vars["DEFINES"], vars["INCLUDES"],
- vars["TARGET_COMPILE_PDB"], vars["TARGET_PDB"], config);
+ vars["TARGET_COMPILE_PDB"], vars["TARGET_PDB"], config, withScanning);
}
objBuild.Outputs.push_back(objectFileName);
@@ -1801,7 +1803,7 @@ void cmNinjaTargetGenerator::WriteCxxModuleBmiBuildStatement(
this->ExportObjectCompileCommand(
language, sourceFilePath, bmiDir, bmiFileName, bmiFileDir, vars["FLAGS"],
vars["DEFINES"], vars["INCLUDES"], vars["TARGET_COMPILE_PDB"],
- vars["TARGET_PDB"], config);
+ vars["TARGET_PDB"], config, WithScanning::Yes);
}
bmiBuild.Outputs.push_back(bmiFileName);
@@ -2031,7 +2033,7 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement(
language, sourceFilePath, objectDir, targetObjectFilename,
cmSystemTools::GetFilenamePath(targetObjectFilename), vars["FLAGS"],
vars["DEFINES"], vars["INCLUDES"],
- /*compile pdb*/ "", /*target pdb*/ "", config);
+ /*compile pdb*/ "", /*target pdb*/ "", config, WithScanning::No);
}
} else {
// Object outputs
@@ -2051,7 +2053,7 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement(
cmSystemTools::GetFilenamePath(objectFilepath), vars["FLAGS"],
vars["DEFINES"], vars["INCLUDES"],
/*compile pdb*/ "",
- /*target pdb*/ "", config);
+ /*target pdb*/ "", config, WithScanning::No);
}
}
}
@@ -2220,7 +2222,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
std::string const& objectFileDir, std::string const& flags,
std::string const& defines, std::string const& includes,
std::string const& targetCompilePdb, std::string const& targetPdb,
- std::string const& outputConfig)
+ std::string const& outputConfig, WithScanning withScanning)
{
if (!this->GeneratorTarget->GetPropertyAsBool("EXPORT_COMPILE_COMMANDS")) {
return;
@@ -2243,14 +2245,12 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
escapedSourceFileName, cmOutputConverter::SHELL);
std::string fullFlags = flags;
- {
- bool const needDyndep =
- this->GetGeneratorTarget()->NeedDyndep(language, outputConfig);
+ if (withScanning == WithScanning::Yes) {
std::string const modmapFormatVar =
cmStrCat("CMAKE_", language, "_MODULE_MAP_FORMAT");
std::string const modmapFormat =
this->Makefile->GetSafeDefinition(modmapFormatVar);
- if (needDyndep && !modmapFormat.empty()) {
+ if (!modmapFormat.empty()) {
std::string modmapFlags = this->GetMakefile()->GetRequiredDefinition(
cmStrCat("CMAKE_", language, "_MODULE_MAP_FLAG"));
// XXX(modmap): If changing this path construction, change
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 7a68599..b55c460 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -193,7 +193,7 @@ protected:
std::string const& objectFileDir, std::string const& flags,
std::string const& defines, std::string const& includes,
std::string const& targetCompilePdb, std::string const& targetPdb,
- std::string const& outputConfig);
+ std::string const& outputConfig, WithScanning withScanning);
void AdditionalCleanFiles(const std::string& config);
diff --git a/Tests/RunCMake/VS10Project/UnityBuildPre2017-check.cmake b/Tests/RunCMake/VS10Project/UnityBuildPre2017-check.cmake
index 17e7b46..c904cd0 100644
--- a/Tests/RunCMake/VS10Project/UnityBuildPre2017-check.cmake
+++ b/Tests/RunCMake/VS10Project/UnityBuildPre2017-check.cmake
@@ -27,7 +27,7 @@ foreach(line IN LISTS tgt_projects_strings)
endif()
endforeach()
-string(REPLACE "\\" "/" unity_source_line ${unity_source_line})
+string(REPLACE "\\" "/" unity_source_line "${unity_source_line}")
string(FIND "${unity_source_line}" "CMakeFiles/tgt.dir/Unity/unity_0_c.c" unity_source_file_position)
if (unity_source_file_position EQUAL "-1")
set(RunCMake_TEST_FAILED "Generated project should include the generated unity source file.")