summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/cxx_modules_rules_clang.cmake9
-rwxr-xr-x.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh4
-rw-r--r--.gitlab/os-linux.yml2
-rw-r--r--Help/command/add_test.rst65
-rw-r--r--Help/command/set_property.rst4
-rw-r--r--Help/generator/CodeBlocks.rst6
-rw-r--r--Help/generator/CodeLite.rst6
-rw-r--r--Help/generator/Eclipse CDT4.rst6
-rw-r--r--Help/generator/Kate.rst6
-rw-r--r--Help/generator/Sublime Text 2.rst6
-rw-r--r--Help/manual/cmake-generators.7.rst6
-rw-r--r--Help/manual/cmake.1.rst4
-rw-r--r--Help/prop_test/WILL_FAIL.rst5
-rw-r--r--Help/release/dev/deprecate-extra-generators.rst5
-rw-r--r--Help/variable/CMAKE_EDIT_COMMAND.rst3
-rw-r--r--Help/variable/CMAKE_EXTRA_GENERATOR.rst6
-rw-r--r--Modules/CMakeSwiftInformation.cmake4
-rw-r--r--Modules/Compiler/LCC-Fortran.cmake7
-rw-r--r--Modules/Platform/Linux-LCC-Fortran.cmake6
-rw-r--r--Modules/Platform/Windows-Apple-Swift.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmCommonTargetGenerator.cxx4
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx2
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx2
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx2
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx3
-rw-r--r--Source/cmExtraKateGenerator.cxx2
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx3
-rw-r--r--Source/cmGeneratorTarget.cxx15
-rw-r--r--Source/cmGeneratorTarget.h2
-rw-r--r--Source/cmGlobalGenerator.cxx10
-rw-r--r--Source/cmMakefile.cxx19
-rw-r--r--Source/cmMakefile.h5
-rw-r--r--Source/cmTarget.cxx76
-rw-r--r--Source/cmTarget.h11
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx26
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h1
-rw-r--r--Source/cmcmd.cxx24
-rw-r--r--Tests/Fortran/CMakeLists.txt2
-rw-r--r--Tests/FortranOnly/CMakeLists.txt17
-rw-r--r--Tests/RunCMake/CommandLine/E_time-stdout.txt2
-rw-r--r--Tests/RunCMake/ExtraGenerators/Simple-stderr.txt8
-rwxr-xr-xUtilities/Scripts/update-nghttp2.bash4
-rw-r--r--Utilities/cmnghttp2/cmakeconfig.h.in3
-rw-r--r--Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2.h6
-rw-r--r--Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2ver.h4
-rw-r--r--Utilities/cmnghttp2/lib/nghttp2_net.h8
47 files changed, 284 insertions, 141 deletions
diff --git a/.gitlab/ci/cxx_modules_rules_clang.cmake b/.gitlab/ci/cxx_modules_rules_clang.cmake
index 4b80aabebc..fcb22817be 100644
--- a/.gitlab/ci/cxx_modules_rules_clang.cmake
+++ b/.gitlab/ci/cxx_modules_rules_clang.cmake
@@ -3,11 +3,12 @@ set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE
"${CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS}"
- " -format=p1689 --p1689-targeted-file-name=<SOURCE> --p1689-targeted-output=<OBJECT> "
- " --p1689-makeformat-output=<DEP_FILE>"
+ " -format=p1689"
" --"
- " <DEFINES> <INCLUDES> <FLAGS> -x c++ <SOURCE>"
- " -MT <DYNDEP_FILE> -MD"
+ " <CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS>"
+ " -x c++ <SOURCE> -c -o <OBJECT>"
+ " -MT <DYNDEP_FILE>"
+ " -MD -MF <DEP_FILE>"
" > <DYNDEP_FILE>")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "clang")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>")
diff --git a/.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh b/.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh
index 025f8a22d8..35f925e61a 100755
--- a/.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh
+++ b/.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh
@@ -2,8 +2,8 @@
set -e
-readonly revision="p1689r5-cmake-ci-20221215" # a0acf2c9285e848b65ec7336e185888163949490
-readonly tarball="https://github.com/mathstuf/llvm-project/archive/$revision.tar.gz"
+readonly revision="6d859df46e93e04bd7a4f90d9a9056763998f638" # llvmorg-16.0.0-rc2-31-g6d859df46e93
+readonly tarball="https://github.com/llvm/llvm-project/archive/$revision.tar.gz"
readonly workdir="$HOME/llvm"
readonly srcdir="$workdir/llvm"
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index 8ab3fad3cd..9a5340162b 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -377,7 +377,7 @@
CMAKE_GENERATOR: "Ninja Multi-Config"
.clang_cxx_modules_x86_64:
- image: "kitware/cmake:ci-clang_cxx_modules-x86_64-2022-12-15"
+ image: "kitware/cmake:ci-clang_cxx_modules-x86_64-2023-02-15"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
diff --git a/Help/command/add_test.rst b/Help/command/add_test.rst
index 53555a4b04..02dd3986aa 100644
--- a/Help/command/add_test.rst
+++ b/Help/command/add_test.rst
@@ -12,13 +12,24 @@ Add a test to the project to be run by :manual:`ctest(1)`.
Adds a test called ``<name>``. The test name may contain arbitrary
characters, expressed as a :ref:`Quoted Argument` or :ref:`Bracket Argument`
-if necessary. See policy :policy:`CMP0110`. The options are:
+if necessary. See policy :policy:`CMP0110`.
+
+CMake only generates tests if the :command:`enable_testing` command has been
+invoked. The :module:`CTest` module invokes ``enable_testing`` automatically
+unless ``BUILD_TESTING`` is set to ``OFF``.
+
+Tests added with the ``add_test(NAME)`` signature support using
+:manual:`generator expressions <cmake-generator-expressions(7)>`
+in test properties set by :command:`set_property(TEST)` or
+:command:`set_tests_properties`. Test properties may only be set in the
+directory the test is created in.
+
+``add_test`` options are:
``COMMAND``
- Specify the test command-line. If ``<command>`` specifies an
- executable target (created by :command:`add_executable`) it will
- automatically be replaced by the location of the executable created
- at build time.
+ Specify the test command-line. If ``<command>`` specifies an executable
+ target created by :command:`add_executable`, it will automatically be
+ replaced by the location of the executable created at build time.
The command may be specified using
:manual:`generator expressions <cmake-generator-expressions(7)>`.
@@ -27,38 +38,29 @@ if necessary. See policy :policy:`CMP0110`. The options are:
Restrict execution of the test only to the named configurations.
``WORKING_DIRECTORY``
- Set the :prop_test:`WORKING_DIRECTORY` test property to
- specify the working directory in which to execute the test.
- If not specified the test will be run with the current working
- directory set to the build directory corresponding to the
- current source directory.
-
- The working directory may be specified using
- :manual:`generator expressions <cmake-generator-expressions(7)>`.
+ Set the test property :prop_test:`WORKING_DIRECTORY` in which to execute the
+ test. If not specified, the test will be run in
+ :variable:`CMAKE_CURRENT_BINARY_DIR`. The working directory may be specified
+ using :manual:`generator expressions <cmake-generator-expressions(7)>`.
``COMMAND_EXPAND_LISTS``
.. versionadded:: 3.16
- Lists in ``COMMAND`` arguments will be expanded, including those
- created with
+ Lists in ``COMMAND`` arguments will be expanded, including those created with
:manual:`generator expressions <cmake-generator-expressions(7)>`.
-The given test command is expected to exit with code ``0`` to pass and
-non-zero to fail, or vice-versa if the :prop_test:`WILL_FAIL` test
-property is set. Any output written to stdout or stderr will be
-captured by :manual:`ctest(1)` but does not affect the pass/fail status
-unless the :prop_test:`PASS_REGULAR_EXPRESSION`,
-:prop_test:`FAIL_REGULAR_EXPRESSION` or
-:prop_test:`SKIP_REGULAR_EXPRESSION` test property is used.
+If the test command exits with code ``0`` the test passes. Non-zero exit code
+is a "failed" test. The test property :prop_test:`WILL_FAIL` inverts this
+logic. Note that system-level test failures such as segmentation faults or
+heap errors will still fail the test even if ``WILL_FALL`` is true. Output
+written to stdout or stderr is captured by :manual:`ctest(1)` and only
+affects the pass/fail status via the :prop_test:`PASS_REGULAR_EXPRESSION`,
+:prop_test:`FAIL_REGULAR_EXPRESSION`, or :prop_test:`SKIP_REGULAR_EXPRESSION`
+test properties.
.. versionadded:: 3.16
Added :prop_test:`SKIP_REGULAR_EXPRESSION` property.
-Tests added with the ``add_test(NAME)`` signature support using
-:manual:`generator expressions <cmake-generator-expressions(7)>`
-in test properties set by :command:`set_property(TEST)` or
-:command:`set_tests_properties`.
-
Example usage:
.. code-block:: cmake
@@ -71,16 +73,9 @@ This creates a test ``mytest`` whose command runs a ``testDriver`` tool
passing the configuration name and the full path to the executable
file produced by target ``myexe``.
-.. note::
-
- CMake will generate tests only if the :command:`enable_testing`
- command has been invoked. The :module:`CTest` module invokes the
- command automatically unless the ``BUILD_TESTING`` option is turned
- ``OFF``.
-
---------------------------------------------------------------------
-This command also supports a simpler, but less flexible, signature:
+The command syntax above is recommended over the older, less flexible form:
.. code-block:: cmake
diff --git a/Help/command/set_property.rst b/Help/command/set_property.rst
index ca19e0cc14..8dd4b94b9f 100644
--- a/Help/command/set_property.rst
+++ b/Help/command/set_property.rst
@@ -82,8 +82,8 @@ It must be one of the following:
to the installation prefix.
``TEST``
- Scope may name zero or more existing tests.
- See also the :command:`set_tests_properties` command.
+ Scope is limited to the directory the command is called in. It may name zero
+ or more existing tests. See also command :command:`set_tests_properties`.
Test property values may be specified using
:manual:`generator expressions <cmake-generator-expressions(7)>`
diff --git a/Help/generator/CodeBlocks.rst b/Help/generator/CodeBlocks.rst
index 85da71543c..5c48bc9d88 100644
--- a/Help/generator/CodeBlocks.rst
+++ b/Help/generator/CodeBlocks.rst
@@ -1,6 +1,12 @@
CodeBlocks
----------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates CodeBlocks project files.
Project files for CodeBlocks will be created in the top directory and
diff --git a/Help/generator/CodeLite.rst b/Help/generator/CodeLite.rst
index 4f276df718..faec9b9f7a 100644
--- a/Help/generator/CodeLite.rst
+++ b/Help/generator/CodeLite.rst
@@ -1,6 +1,12 @@
CodeLite
----------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates CodeLite project files.
Project files for CodeLite will be created in the top directory and
diff --git a/Help/generator/Eclipse CDT4.rst b/Help/generator/Eclipse CDT4.rst
index 634e2b6ddf..9c1610d617 100644
--- a/Help/generator/Eclipse CDT4.rst
+++ b/Help/generator/Eclipse CDT4.rst
@@ -1,6 +1,12 @@
Eclipse CDT4
------------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates Eclipse CDT 4.0 project files.
Project files for Eclipse will be created in the top directory. In
diff --git a/Help/generator/Kate.rst b/Help/generator/Kate.rst
index 129bf631be..d12723b4f2 100644
--- a/Help/generator/Kate.rst
+++ b/Help/generator/Kate.rst
@@ -1,6 +1,12 @@
Kate
----
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates Kate project files.
A project file for Kate will be created in the top directory in the top level
diff --git a/Help/generator/Sublime Text 2.rst b/Help/generator/Sublime Text 2.rst
index 0a07ea983b..a45ab08252 100644
--- a/Help/generator/Sublime Text 2.rst
+++ b/Help/generator/Sublime Text 2.rst
@@ -1,6 +1,12 @@
Sublime Text 2
--------------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates Sublime Text 2 project files.
Project files for Sublime Text 2 will be created in the top directory
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst
index ed5bbbf6cb..9647f0d11d 100644
--- a/Help/manual/cmake-generators.7.rst
+++ b/Help/manual/cmake-generators.7.rst
@@ -107,6 +107,12 @@ Other Generators
Extra Generators
================
+.. deprecated:: 3.27
+
+ Support for "Extra Generators" is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Some of the `CMake Generators`_ listed in the :manual:`cmake(1)`
command-line tool :option:`--help <cmake --help>` output may have
variants that specify an extra generator for an auxiliary IDE tool.
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 76dc883d38..a107c66b6f 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -781,7 +781,7 @@ Available commands are:
(:option:`-A ... <cmake -A>`). The value is a list of platforms known to
be supported.
``extraGenerators``
- A list of strings with all the extra generators compatible with
+ A list of strings with all the :ref:`Extra Generators` compatible with
the generator.
``fileApi``
@@ -1196,7 +1196,7 @@ Available commands are:
.. option:: time <command> [<args>...]
- Run command and display elapsed time.
+ Run ``<command>`` and display elapsed time (including overhead of CMake frontend).
.. versionadded:: 3.5
The command now properly passes arguments with spaces or special characters
diff --git a/Help/prop_test/WILL_FAIL.rst b/Help/prop_test/WILL_FAIL.rst
index f1f94a43a7..4926f40779 100644
--- a/Help/prop_test/WILL_FAIL.rst
+++ b/Help/prop_test/WILL_FAIL.rst
@@ -3,5 +3,6 @@ WILL_FAIL
If set to true, this will invert the pass/fail flag of the test.
-This property can be used for tests that are expected to fail and
-return a non zero return code.
+This property can be used for tests that are expected to fail and return a
+non-zero return code. Note that system-level test failures such as segmentation
+faults or heap errors will still fail the test even if ``WILL_FALL`` is true.
diff --git a/Help/release/dev/deprecate-extra-generators.rst b/Help/release/dev/deprecate-extra-generators.rst
new file mode 100644
index 0000000000..ceb2f4e1a8
--- /dev/null
+++ b/Help/release/dev/deprecate-extra-generators.rst
@@ -0,0 +1,5 @@
+deprecate-extra-generators
+--------------------------
+
+* The :ref:`Extra Generators` have been deprecated. IDEs may use the
+ :manual:`cmake-file-api(7)` to view CMake-generated project build trees.
diff --git a/Help/variable/CMAKE_EDIT_COMMAND.rst b/Help/variable/CMAKE_EDIT_COMMAND.rst
index 2f4ab1f62a..b21434f7ff 100644
--- a/Help/variable/CMAKE_EDIT_COMMAND.rst
+++ b/Help/variable/CMAKE_EDIT_COMMAND.rst
@@ -2,7 +2,8 @@ CMAKE_EDIT_COMMAND
------------------
Full path to :manual:`cmake-gui(1)` or :manual:`ccmake(1)`. Defined only for
-:ref:`Makefile Generators` when not using an "extra" generator for an IDE.
+:ref:`Makefile Generators` and :ref:`Ninja Generators` when not using any
+:ref:`Extra Generators`.
This is the full path to the CMake executable that can graphically
edit the cache. For example, :manual:`cmake-gui(1)` or :manual:`ccmake(1)`.
diff --git a/Help/variable/CMAKE_EXTRA_GENERATOR.rst b/Help/variable/CMAKE_EXTRA_GENERATOR.rst
index 2c9232345f..0a113a5ae6 100644
--- a/Help/variable/CMAKE_EXTRA_GENERATOR.rst
+++ b/Help/variable/CMAKE_EXTRA_GENERATOR.rst
@@ -1,6 +1,12 @@
CMAKE_EXTRA_GENERATOR
---------------------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
The extra generator used to build the project. See
:manual:`cmake-generators(7)`.
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index a75dfceea1..d27aa3f6af 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -72,9 +72,9 @@ if(CMAKE_GENERATOR STREQUAL "Xcode")
# these options here will have no effect when compiling with the built-in driver,
# and will explode violently, leaving build products in the source directory, when
# using the old swift driver.
- set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g")
+ set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g ${CMAKE_Swift_FLAGS_DEBUG_LINKER_FLAGS}")
set(CMAKE_Swift_FLAGS_RELEASE_INIT "-O")
- set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g")
+ set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g ${CMAKE_Swift_FLAGS_RELWITHDEBINFO_LINKER_FLAGS}")
set(CMAKE_Swift_FLAGS_MINSIZEREL_INIT "-Osize")
else()
set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g -incremental")
diff --git a/Modules/Compiler/LCC-Fortran.cmake b/Modules/Compiler/LCC-Fortran.cmake
index 8091b29949..2d82ea8063 100644
--- a/Modules/Compiler/LCC-Fortran.cmake
+++ b/Modules/Compiler/LCC-Fortran.cmake
@@ -10,8 +10,11 @@ set(CMAKE_Fortran_PREPROCESS_SOURCE
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
-set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
-set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
+# LCC < 1.24.00 has a broken Fortran preprocessor
+if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.24.00")
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
+endif()
set(CMAKE_Fortran_POSTPROCESS_FLAG "-fpreprocessed")
diff --git a/Modules/Platform/Linux-LCC-Fortran.cmake b/Modules/Platform/Linux-LCC-Fortran.cmake
index bf2a1c2d68..308c771c54 100644
--- a/Modules/Platform/Linux-LCC-Fortran.cmake
+++ b/Modules/Platform/Linux-LCC-Fortran.cmake
@@ -1,7 +1,9 @@
include(Platform/Linux-LCC)
__linux_compiler_lcc(Fortran)
-if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "1.26.03")
+if (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.26.03")
+ set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-lgfortran")
+elseif (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.24.01")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-llfortran")
else()
- set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-lgfortran")
+ unset(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
endif()
diff --git a/Modules/Platform/Windows-Apple-Swift.cmake b/Modules/Platform/Windows-Apple-Swift.cmake
index 1177755474..3f754fda09 100644
--- a/Modules/Platform/Windows-Apple-Swift.cmake
+++ b/Modules/Platform/Windows-Apple-Swift.cmake
@@ -1 +1,3 @@
set(CMAKE_Swift_IMPLIB_LINKER_FLAGS "-Xlinker -implib:<TARGET_IMPLIB>")
+set(CMAKE_Swift_FLAGS_DEBUG_LINKER_FLAGS "-Xlinker -debug")
+set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_LINKER_FLAGS "-Xlinker -debug")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 5868ad7ec1..482f849869 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 26)
-set(CMake_VERSION_PATCH 20230215)
+set(CMake_VERSION_PATCH 20230217)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index a63c162ac8..1705763a05 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -176,7 +176,9 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories(
// We can ignore the INTERFACE_LIBRARY items because
// Target->GetLinkInformation already processed their
// link interface and they don't have any output themselves.
- && linkee->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
+ && (linkee->GetType() != cmStateEnums::INTERFACE_LIBRARY
+ // Synthesized targets may have relevant rules.
+ || linkee->IsSynthetic()) &&
((lang == "CXX"_s && linkee->HaveCxx20ModuleSources()) ||
(lang == "Fortran"_s && linkee->HaveFortranSources(config))) &&
emitted.insert(linkee).second) {
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index 33c057dab0..c6ebad5c2d 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -85,7 +85,7 @@ std::string cmExportTryCompileFileGenerator::FindTargets(
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*prop);
cmTarget dummyHead("try_compile_dummy_exe", cmStateEnums::EXECUTABLE,
- cmTarget::VisibilityNormal, tgt->Target->GetMakefile(),
+ cmTarget::Visibility::Normal, tgt->Target->GetMakefile(),
cmTarget::PerConfig::Yes);
cmGeneratorTarget gDummyHead(&dummyHead, tgt->GetLocalGenerator());
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 988c5c3d55..e9e2921316 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -45,7 +45,7 @@ cmExtraCodeBlocksGenerator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<
cmExtraCodeBlocksGenerator>
- factory("CodeBlocks", "Generates CodeBlocks project files.");
+ factory("CodeBlocks", "Generates CodeBlocks project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
#if defined(_WIN32)
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 9e8ac5cf0e..7538a7f469 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -33,7 +33,7 @@ cmExtraCodeLiteGenerator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<
cmExtraCodeLiteGenerator>
- factory("CodeLite", "Generates CodeLite project files.");
+ factory("CodeLite", "Generates CodeLite project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
#if defined(_WIN32)
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index a07acdc9ae..6201889f22 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -63,7 +63,8 @@ cmExtraEclipseCDT4Generator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<
cmExtraEclipseCDT4Generator>
- factory("Eclipse CDT4", "Generates Eclipse CDT 4.0 project files.");
+ factory("Eclipse CDT4",
+ "Generates Eclipse CDT 4.0 project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
// TODO: Verify if __CYGWIN__ should be checked.
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index 0020690060..a128a8b11f 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -25,7 +25,7 @@ cmExtraKateGenerator::cmExtraKateGenerator() = default;
cmExternalMakefileProjectGeneratorFactory* cmExtraKateGenerator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<cmExtraKateGenerator>
- factory("Kate", "Generates Kate project files.");
+ factory("Kate", "Generates Kate project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
#if defined(_WIN32)
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 19e87d52f8..33901ac594 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -43,7 +43,8 @@ cmExtraSublimeTextGenerator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<
cmExtraSublimeTextGenerator>
- factory("Sublime Text 2", "Generates Sublime Text 2 project files.");
+ factory("Sublime Text 2",
+ "Generates Sublime Text 2 project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
#if defined(_WIN32)
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f83be264e8..be6456b789 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1237,6 +1237,16 @@ bool cmGeneratorTarget::IsInBuildSystem() const
return false;
}
+bool cmGeneratorTarget::IsNormal() const
+{
+ return this->Target->IsNormal();
+}
+
+bool cmGeneratorTarget::IsSynthetic() const
+{
+ return this->Target->IsSynthetic();
+}
+
bool cmGeneratorTarget::IsImported() const
{
return this->Target->IsImported();
@@ -7105,6 +7115,11 @@ cmGeneratorTarget::OutputInfo const* cmGeneratorTarget::GetOutputInfo(
return nullptr;
}
+ // Synthetic targets don't have output.
+ if (this->IsSynthetic()) {
+ return nullptr;
+ }
+
// Only libraries and executables have well-defined output files.
if (!this->HaveWellDefinedOutputFiles()) {
std::string msg = cmStrCat("cmGeneratorTarget::GetOutputInfo called for ",
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index afd9da4330..e46c71967b 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -50,6 +50,8 @@ public:
cmGlobalGenerator* GetGlobalGenerator() const;
bool IsInBuildSystem() const;
+ bool IsNormal() const;
+ bool IsSynthetic() const;
bool IsImported() const;
bool IsImportedGloballyVisible() const;
bool CanCompileSources() const;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 492f848a21..72eed69511 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1327,6 +1327,16 @@ void cmGlobalGenerator::Configure()
this->BinaryDirectories.insert(
this->CMakeInstance->GetHomeOutputDirectory());
+ if (this->ExtraGenerator && !this->CMakeInstance->GetIsInTryCompile()) {
+ this->CMakeInstance->IssueMessage(
+ MessageType::DEPRECATION_WARNING,
+ cmStrCat("Support for \"Extra Generators\" like\n ",
+ this->ExtraGenerator->GetName(),
+ "\nis deprecated and will be removed from a future version "
+ "of CMake. IDEs may use the cmake-file-api(7) to view "
+ "CMake-generated project build trees."));
+ }
+
// now do it
this->ConfigureDoneCMP0026AndCMP0024 = false;
dirMf->Configure();
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 0ad0e6e6ff..d963a5aa0b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2115,12 +2115,21 @@ cmTarget* cmMakefile::AddNewTarget(cmStateEnums::TargetType type,
return &this->CreateNewTarget(name, type).first;
}
+cmTarget* cmMakefile::AddSynthesizedTarget(cmStateEnums::TargetType type,
+ const std::string& name)
+{
+ return &this
+ ->CreateNewTarget(name, type, cmTarget::PerConfig::Yes,
+ cmTarget::Visibility::Generated)
+ .first;
+}
+
std::pair<cmTarget&, bool> cmMakefile::CreateNewTarget(
const std::string& name, cmStateEnums::TargetType type,
- cmTarget::PerConfig perConfig)
+ cmTarget::PerConfig perConfig, cmTarget::Visibility vis)
{
- auto ib = this->Targets.emplace(
- name, cmTarget(name, type, cmTarget::VisibilityNormal, this, perConfig));
+ auto ib =
+ this->Targets.emplace(name, cmTarget(name, type, vis, this, perConfig));
auto it = ib.first;
if (!ib.second) {
return std::make_pair(std::ref(it->second), false);
@@ -4203,8 +4212,8 @@ cmTarget* cmMakefile::AddImportedTarget(const std::string& name,
// Create the target.
std::unique_ptr<cmTarget> target(
new cmTarget(name, type,
- global ? cmTarget::VisibilityImportedGlobally
- : cmTarget::VisibilityImported,
+ global ? cmTarget::Visibility::ImportedGlobally
+ : cmTarget::Visibility::Imported,
this, cmTarget::PerConfig::Yes));
// Add to the set of available imported targets.
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 3866aca7f2..7b19c9760f 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -241,10 +241,13 @@ public:
std::pair<cmTarget&, bool> CreateNewTarget(
const std::string& name, cmStateEnums::TargetType type,
- cmTarget::PerConfig perConfig = cmTarget::PerConfig::Yes);
+ cmTarget::PerConfig perConfig = cmTarget::PerConfig::Yes,
+ cmTarget::Visibility vis = cmTarget::Visibility::Normal);
cmTarget* AddNewTarget(cmStateEnums::TargetType type,
const std::string& name);
+ cmTarget* AddSynthesizedTarget(cmStateEnums::TargetType type,
+ const std::string& name);
/** Create a target instance for the utility. */
cmTarget* AddNewUtilityTarget(const std::string& utilityName,
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index e8d66ccf6e..91d5de6c8c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -629,10 +629,9 @@ public:
bool IsDLLPlatform;
bool IsAIX;
bool IsAndroid;
- bool IsImportedTarget;
- bool ImportedGloballyVisible;
bool BuildInterfaceIncludesAppended;
bool PerConfig;
+ cmTarget::Visibility TargetVisibility;
std::set<BT<std::pair<std::string, bool>>> Utilities;
std::vector<cmCustomCommand> PreBuildCommands;
std::vector<cmCustomCommand> PreLinkCommands;
@@ -667,6 +666,8 @@ public:
cmTargetInternals();
+ bool IsImported() const;
+
bool CheckImportedLibName(std::string const& prop,
std::string const& value) const;
@@ -914,9 +915,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->impl->IsDLLPlatform = false;
this->impl->IsAIX = false;
this->impl->IsAndroid = false;
- this->impl->IsImportedTarget =
- (vis == VisibilityImported || vis == VisibilityImportedGlobally);
- this->impl->ImportedGloballyVisible = vis == VisibilityImportedGlobally;
+ this->impl->TargetVisibility = vis;
this->impl->BuildInterfaceIncludesAppended = false;
this->impl->PerConfig = (perConfig == PerConfig::Yes);
@@ -939,7 +938,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
// Save the backtrace of target construction.
this->impl->Backtrace = this->impl->Makefile->GetBacktrace();
- if (!this->IsImported()) {
+ if (this->IsNormal()) {
// Initialize the INCLUDE_DIRECTORIES property based on the current value
// of the same directory property:
this->impl->IncludeDirectories.CopyFromDirectory(
@@ -988,7 +987,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
if (this->impl->TargetType != cmStateEnums::UTILITY &&
this->impl->TargetType != cmStateEnums::GLOBAL_TARGET) {
metConditions.insert(TargetProperty::InitCondition::NormalTarget);
- if (!this->IsImported()) {
+ if (this->IsNormal()) {
metConditions.insert(
TargetProperty::InitCondition::NormalNonImportedTarget);
}
@@ -1091,7 +1090,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
}
}
- if (this->IsImported() || mf->GetPropertyAsBool("SYSTEM")) {
+ if (!this->IsNormal() || mf->GetPropertyAsBool("SYSTEM")) {
this->SetProperty("SYSTEM", "ON");
}
@@ -1863,8 +1862,8 @@ void cmTarget::StoreProperty(const std::string& prop, ValueType value)
return;
}
/* no need to change anything if value does not change */
- if (!this->impl->ImportedGloballyVisible) {
- this->impl->ImportedGloballyVisible = true;
+ if (!this->IsImportedGloballyVisible()) {
+ this->impl->TargetVisibility = Visibility::ImportedGlobally;
this->GetGlobalGenerator()->IndexTarget(this);
}
} else if (cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME") &&
@@ -2555,14 +2554,65 @@ bool cmTarget::IsAIX() const
return this->impl->IsAIX;
}
+bool cmTarget::IsNormal() const
+{
+ switch (this->impl->TargetVisibility) {
+ case Visibility::Normal:
+ return true;
+ case Visibility::Generated:
+ case Visibility::Imported:
+ case Visibility::ImportedGlobally:
+ return false;
+ }
+ assert(false && "unknown visibility (IsNormal)");
+ return false;
+}
+
+bool cmTarget::IsSynthetic() const
+{
+ switch (this->impl->TargetVisibility) {
+ case Visibility::Generated:
+ return true;
+ case Visibility::Normal:
+ case Visibility::Imported:
+ case Visibility::ImportedGlobally:
+ return false;
+ }
+ assert(false && "unknown visibility (IsSynthetic)");
+ return false;
+}
+
+bool cmTargetInternals::IsImported() const
+{
+ switch (this->TargetVisibility) {
+ case cmTarget::Visibility::Imported:
+ case cmTarget::Visibility::ImportedGlobally:
+ return true;
+ case cmTarget::Visibility::Normal:
+ case cmTarget::Visibility::Generated:
+ return false;
+ }
+ assert(false && "unknown visibility (IsImported)");
+ return false;
+}
+
bool cmTarget::IsImported() const
{
- return this->impl->IsImportedTarget;
+ return this->impl->IsImported();
}
bool cmTarget::IsImportedGloballyVisible() const
{
- return this->impl->ImportedGloballyVisible;
+ switch (this->impl->TargetVisibility) {
+ case Visibility::ImportedGlobally:
+ return true;
+ case Visibility::Normal:
+ case Visibility::Generated:
+ case Visibility::Imported:
+ return false;
+ }
+ assert(false && "unknown visibility (IsImportedGloballyVisible)");
+ return false;
}
bool cmTarget::IsPerConfig() const
@@ -2858,7 +2908,7 @@ bool cmTargetInternals::CheckImportedLibName(std::string const& prop,
std::string const& value) const
{
if (this->TargetType != cmStateEnums::INTERFACE_LIBRARY ||
- !this->IsImportedTarget) {
+ !this->IsImported()) {
this->Makefile->IssueMessage(
MessageType::FATAL_ERROR,
prop +
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 38bd0365a1..95539fa674 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -46,11 +46,12 @@ class BTs;
class cmTarget
{
public:
- enum Visibility
+ enum class Visibility
{
- VisibilityNormal,
- VisibilityImported,
- VisibilityImportedGlobally
+ Normal,
+ Generated,
+ Imported,
+ ImportedGlobally,
};
enum class PerConfig
@@ -205,6 +206,8 @@ public:
//! Return whether or not we are targeting AIX.
bool IsAIX() const;
+ bool IsNormal() const;
+ bool IsSynthetic() const;
bool IsImported() const;
bool IsImportedGloballyVisible() const;
bool IsPerConfig() const;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index c88679c649..ae0d255b59 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3108,6 +3108,17 @@ std::vector<std::string> cmVisualStudio10TargetGenerator::GetIncludes(
return includes;
}
+std::string cmVisualStudio10TargetGenerator::GetTargetOutputName() const
+{
+ std::string config;
+ if (!this->Configurations.empty()) {
+ config = this->Configurations[0];
+ }
+ const auto& nameComponents =
+ this->GeneratorTarget->GetFullNameComponents(config);
+ return nameComponents.prefix + nameComponents.base;
+}
+
bool cmVisualStudio10TargetGenerator::ComputeClOptions()
{
return std::all_of(
@@ -5057,8 +5068,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP80(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
@@ -5140,8 +5150,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP81(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
@@ -5203,8 +5212,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS80(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
@@ -5258,8 +5266,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS81(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
@@ -5318,8 +5325,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS10_0(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index e00f692b76..97ae69fc37 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -117,6 +117,7 @@ private:
std::vector<std::string> GetIncludes(std::string const& config,
std::string const& lang) const;
+ std::string GetTargetOutputName() const;
bool ComputeClOptions();
bool ComputeClOptions(std::string const& configName);
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 21d0cc935c..d57b78b025 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -50,10 +50,10 @@
#endif
#include <array>
+#include <chrono>
#include <cstdio>
#include <cstdlib>
#include <cstring>
-#include <ctime>
#include <iostream>
#include <memory>
#include <sstream>
@@ -1104,27 +1104,13 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
if (args[1] == "time" && args.size() > 2) {
std::vector<std::string> command(args.begin() + 2, args.end());
- clock_t clock_start;
- clock_t clock_finish;
- time_t time_start;
- time_t time_finish;
-
- time(&time_start);
- clock_start = clock();
int ret = 0;
+ auto time_start = std::chrono::steady_clock::now();
cmSystemTools::RunSingleCommand(command, nullptr, nullptr, &ret);
+ auto time_finish = std::chrono::steady_clock::now();
- clock_finish = clock();
- time(&time_finish);
-
- double clocks_per_sec = static_cast<double>(CLOCKS_PER_SEC);
- std::cout << "Elapsed time: "
- << static_cast<long>(time_finish - time_start) << " s. (time)"
- << ", "
- << static_cast<double>(clock_finish - clock_start) /
- clocks_per_sec
- << " s. (clock)"
- << "\n";
+ std::chrono::duration<double> time_elapsed = time_finish - time_start;
+ std::cout << "Elapsed time (seconds): " << time_elapsed.count() << "\n";
return ret;
}
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 0fede25675..30ab16b51b 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -49,7 +49,7 @@ function(test_fortran_c_interface_module)
FortranCInterface_VERIFY()
FortranCInterface_VERIFY(CXX)
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|PathScale|Absoft|Fujitsu")
+ if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|PathScale|Absoft|Fujitsu|LCC")
set(module_expected 1)
endif()
if(FortranCInterface_MODULE_FOUND OR module_expected)
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index fc71a18ccf..d749fe10ff 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -152,13 +152,16 @@ if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON AND
set_property(SOURCE preprocess3.f PROPERTY Fortran_PREPROCESS ON)
endif()
-# Test that neither the compiler nor CMake performs unnecessary preprocessing.
-add_library(no_preprocess_target_lower STATIC no_preprocess_target_lower.f)
-target_compile_options(no_preprocess_target_lower PRIVATE -DINTEGER=nonsense)
-set_property(TARGET no_preprocess_target_lower PROPERTY Fortran_PREPROCESS OFF)
-add_library(no_preprocess_source_lower STATIC no_preprocess_source_lower.f)
-target_compile_options(no_preprocess_source_lower PRIVATE -DINTEGER=nonsense)
-set_property(SOURCE no_preprocess_source_lower.f PROPERTY Fortran_PREPROCESS OFF)
+# LCC < 1.24 has no way to disable Fortran preprocessor
+if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL "LCC" OR CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.24.00")
+ # Test that neither the compiler nor CMake performs unnecessary preprocessing.
+ add_library(no_preprocess_target_lower STATIC no_preprocess_target_lower.f)
+ target_compile_options(no_preprocess_target_lower PRIVATE -DINTEGER=nonsense)
+ set_property(TARGET no_preprocess_target_lower PROPERTY Fortran_PREPROCESS OFF)
+ add_library(no_preprocess_source_lower STATIC no_preprocess_source_lower.f)
+ target_compile_options(no_preprocess_source_lower PRIVATE -DINTEGER=nonsense)
+ set_property(SOURCE no_preprocess_source_lower.f PROPERTY Fortran_PREPROCESS OFF)
+endif()
# Test that we can explicitly not preprocess a target or source.
# This will not work on certain compilers due to either missing a
diff --git a/Tests/RunCMake/CommandLine/E_time-stdout.txt b/Tests/RunCMake/CommandLine/E_time-stdout.txt
index a51446a67e..1a5e13479b 100644
--- a/Tests/RunCMake/CommandLine/E_time-stdout.txt
+++ b/Tests/RunCMake/CommandLine/E_time-stdout.txt
@@ -1,3 +1,3 @@
^hello world
-Elapsed time: [^
+Elapsed time \(seconds\): [^
]*$
diff --git a/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt b/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt
new file mode 100644
index 0000000000..e327a9f3ec
--- /dev/null
+++ b/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Deprecation Warning:
+ Support for "Extra Generators" like
+
+ [^
+]+
+
+ is deprecated and will be removed from a future version of CMake\. IDEs may
+ use the cmake-file-api\(7\) to view CMake-generated project build trees\.
diff --git a/Utilities/Scripts/update-nghttp2.bash b/Utilities/Scripts/update-nghttp2.bash
index bc76377ddc..c638efeedd 100755
--- a/Utilities/Scripts/update-nghttp2.bash
+++ b/Utilities/Scripts/update-nghttp2.bash
@@ -8,7 +8,7 @@ readonly name="nghttp2"
readonly ownership="nghttp2 upstream <kwrobot@kitware.com>"
readonly subtree="Utilities/cmnghttp2"
readonly repo="https://github.com/nghttp2/nghttp2.git"
-readonly tag="v1.50.0"
+readonly tag="v1.52.0" # When updating, sync PACKAGE_VERSION below!
readonly shortlog=false
readonly paths="
COPYING
@@ -23,7 +23,7 @@ extract_source () {
pushd "${extractdir}/${name}-reduced"
echo "* -whitespace" > .gitattributes
mv lib/includes/nghttp2/nghttp2ver.h.in lib/includes/nghttp2/nghttp2ver.h
- sed -i 's/@PACKAGE_VERSION@/1.40.0/;s/@PACKAGE_VERSION_NUM@/0x012800/' lib/includes/nghttp2/nghttp2ver.h
+ sed -i 's/@PACKAGE_VERSION@/1.52.0/;s/@PACKAGE_VERSION_NUM@/0x013400/' lib/includes/nghttp2/nghttp2ver.h
popd
}
diff --git a/Utilities/cmnghttp2/cmakeconfig.h.in b/Utilities/cmnghttp2/cmakeconfig.h.in
index 60698fb99b..8b14df2f50 100644
--- a/Utilities/cmnghttp2/cmakeconfig.h.in
+++ b/Utilities/cmnghttp2/cmakeconfig.h.in
@@ -8,9 +8,6 @@
/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine ssize_t @ssize_t@
-/* sizeof(int *) */
-#define SIZEOF_INT_P KWIML_ABI_SIZEOF_DATA_PTR
-
/* Define to 1 if you have the <arpa/inet.h> header file. */
#cmakedefine HAVE_ARPA_INET_H 1
diff --git a/Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2.h b/Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2.h
index 61a14d99eb..65077dd516 100644
--- a/Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2.h
+++ b/Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2.h
@@ -1430,12 +1430,6 @@ typedef ssize_t (*nghttp2_recv_callback)(nghttp2_session *session, uint8_t *buf,
* respectively. The header name/value pairs are emitted via
* :type:`nghttp2_on_header_callback`.
*
- * For HEADERS, PUSH_PROMISE and DATA frames, this callback may be
- * called after stream is closed (see
- * :type:`nghttp2_on_stream_close_callback`). The application should
- * check that stream is still alive using its own stream management or
- * :func:`nghttp2_session_get_stream_user_data()`.
- *
* Only HEADERS and DATA frame can signal the end of incoming data.
* If ``frame->hd.flags & NGHTTP2_FLAG_END_STREAM`` is nonzero, the
* |frame| is the last frame from the remote peer in this stream.
diff --git a/Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2ver.h b/Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2ver.h
index 45d21e2645..6ed0ac4a9b 100644
--- a/Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2ver.h
+++ b/Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2ver.h
@@ -29,7 +29,7 @@
* @macro
* Version number of the nghttp2 library release
*/
-#define NGHTTP2_VERSION "1.40.0"
+#define NGHTTP2_VERSION "1.52.0"
/**
* @macro
@@ -37,6 +37,6 @@
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
-#define NGHTTP2_VERSION_NUM 0x012800
+#define NGHTTP2_VERSION_NUM 0x013400
#endif /* NGHTTP2VER_H */
diff --git a/Utilities/cmnghttp2/lib/nghttp2_net.h b/Utilities/cmnghttp2/lib/nghttp2_net.h
index 345f6c834f..521f98143e 100644
--- a/Utilities/cmnghttp2/lib/nghttp2_net.h
+++ b/Utilities/cmnghttp2/lib/nghttp2_net.h
@@ -71,9 +71,9 @@ STIN uint16_t htons(uint16_t hostshort) {
STIN uint32_t ntohl(uint32_t netlong) {
uint32_t res;
unsigned char *p = (unsigned char *)&netlong;
- res = *p++ << 24;
- res += *p++ << 16;
- res += *p++ << 8;
+ res = (uint32_t)(*p++ << 24);
+ res += (uint32_t)(*p++ << 16);
+ res += (uint32_t)(*p++ << 8);
res += *p;
return res;
}
@@ -81,7 +81,7 @@ STIN uint32_t ntohl(uint32_t netlong) {
STIN uint16_t ntohs(uint16_t netshort) {
uint16_t res;
unsigned char *p = (unsigned char *)&netshort;
- res = *p++ << 8;
+ res = (uint16_t)(*p++ << 8);
res += *p;
return res;
}