diff options
235 files changed, 1213 insertions, 1150 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c13ba72..3c1c9cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -350,6 +350,16 @@ t:cuda11.8-minimal-ninja: variables: CMAKE_CI_NO_MR: "true" +t:cuda11.8-minimal-splayed-ninja: + extends: + - .cuda11.8_splayed_nvidia + - .cmake_test_linux_release + - .linux_x86_64_tags_cuda + - .run_dependent + - .needs_centos7_x86_64 + variables: + CMAKE_CI_NO_MR: "true" + t:hip5.5-nvidia: extends: - .hip5.5_nvidia diff --git a/.gitlab/ci/configure_cuda11.8_splayed_nvidia.cmake b/.gitlab/ci/configure_cuda11.8_splayed_nvidia.cmake new file mode 100644 index 0000000..519699b --- /dev/null +++ b/.gitlab/ci/configure_cuda11.8_splayed_nvidia.cmake @@ -0,0 +1,3 @@ +set(CMake_TEST_CUDA "NVIDIA" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake index 8342db6..f0ba9eb 100644 --- a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake +++ b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake @@ -1,4 +1,3 @@ set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,bmionly" CACHE STRING "") -set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_gcc.cmake" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake index 8342db6..f0ba9eb 100644 --- a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake +++ b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake @@ -1,4 +1,3 @@ set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,bmionly" CACHE STRING "") -set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_gcc.cmake" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake b/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake index 2349bfd..e378d62 100644 --- a/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake +++ b/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake @@ -1,2 +1 @@ set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,shared,export_bmi,install_bmi,bmionly" CACHE STRING "") -set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_msvc.cmake" CACHE STRING "") diff --git a/.gitlab/ci/cxx_modules_rules_clang.cmake b/.gitlab/ci/cxx_modules_rules_clang.cmake index a8e1ff6..1268244 100644 --- a/.gitlab/ci/cxx_modules_rules_clang.cmake +++ b/.gitlab/ci/cxx_modules_rules_clang.cmake @@ -1,5 +1,3 @@ -set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") - # Default to C++ extensions being off. Clang's modules support have trouble # with extensions right now. set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/.gitlab/ci/cxx_modules_rules_gcc.cmake b/.gitlab/ci/cxx_modules_rules_gcc.cmake deleted file mode 100644 index 2b09b0e..0000000 --- a/.gitlab/ci/cxx_modules_rules_gcc.cmake +++ /dev/null @@ -1 +0,0 @@ -set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") diff --git a/.gitlab/ci/cxx_modules_rules_msvc.cmake b/.gitlab/ci/cxx_modules_rules_msvc.cmake deleted file mode 100644 index 2b09b0e..0000000 --- a/.gitlab/ci/cxx_modules_rules_msvc.cmake +++ /dev/null @@ -1 +0,0 @@ -set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") diff --git a/.gitlab/ci/env_cuda11.8_splayed_nvidia.sh b/.gitlab/ci/env_cuda11.8_splayed_nvidia.sh new file mode 100644 index 0000000..38e788d --- /dev/null +++ b/.gitlab/ci/env_cuda11.8_splayed_nvidia.sh @@ -0,0 +1,36 @@ +# +# Splay the libraries and includes to emulate conda where +# things are split between the host and build prefix +# +# /usr/local/cuda/include/crt/ -> /tmp/cuda/include/crt +# /usr/local/cuda/lib64/stubs/ -> /tmp/cuda/stubs/ +# /usr/local/cuda/lib64/libcudart* -> /tmp/cuda/libs/ +# +# Also reduce to minimal subset of libraries by removing +# static libraries to emulate a minimal cuda install +mkdir -p /tmp/cuda/libs +mkdir -p /tmp/cuda/stubs +mkdir -p /tmp/cuda/include + +mv /usr/local/cuda/lib64/libcuda* /tmp/cuda/libs +mv /usr/local/cuda/lib64/stubs/ /tmp/cuda/stubs/ +mv /usr/local/cuda/include/crt/ /tmp/cuda/include/ + +# patch the nvcc.profile to handle the splayed layout +# which allows verification +mv /usr/local/cuda/bin/nvcc.profile /usr/local/cuda/bin/nvcc.profile.orig +echo " +TOP = \$(_HERE_)/.. + +NVVMIR_LIBRARY_DIR = \$(TOP)/\$(_NVVM_BRANCH_)/libdevice + +LD_LIBRARY_PATH += \$(TOP)/lib: +PATH += \$(TOP)/\$(_NVVM_BRANCH_)/bin:\$(_HERE_): + +INCLUDES += \"-I\$(TOP)/\$(_TARGET_DIR_)/include\" \$(_SPACE_) \"-I/tmp/cuda/include\" \$(_SPACE_) + +LIBRARIES =+ \$(_SPACE_) \"-L\$(TOP)/\$(_TARGET_DIR_)/lib\$(_TARGET_SIZE_)\" \"-L/tmp/cuda/stubs/\" \"-L/tmp/cuda/libs\" + +CUDAFE_FLAGS += +PTXAS_FLAGS += +" > /usr/local/cuda/bin/nvcc.profile diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index e70dc07..8894057 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -362,6 +362,12 @@ CMAKE_CONFIGURATION: cuda11.8_minimal_nvidia CTEST_NO_WARNINGS_ALLOWED: 1 +.cuda11.8_splayed_nvidia: + extends: .cuda11.8_minimal + variables: + CMAKE_CONFIGURATION: cuda11.8_splayed_nvidia + CTEST_NO_WARNINGS_ALLOWED: 1 + ### HIP builds .hip5.5: diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index 82dc563..4bbdc65 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -3137,7 +3137,6 @@ syn keyword cmakeKWexecute_process contained syn keyword cmakeKWexport contained \ ANDROID_MK \ APPEND - \ CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API \ CONFIG \ CXX_MODULES_DIRECTORY \ EXPORT @@ -3707,7 +3706,6 @@ syn keyword cmakeKWinstall contained \ BUILD_TYPE \ BUNDLE \ BUNDLE_EXECUTABLE - \ CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API \ CMAKE_INSTALL_BINDIR \ CMAKE_INSTALL_DATADIR \ CMAKE_INSTALL_DATAROOTDIR @@ -4258,7 +4256,6 @@ syn keyword cmakeKWtarget_sources contained \ ALIAS \ BASE_DIRS \ BUILD_INTERFACE - \ CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API \ CONFIG \ CORRECT \ CXX_MODULES diff --git a/Help/command/export.rst b/Help/command/export.rst index 2e14a10..cc927bc 100644 --- a/Help/command/export.rst +++ b/Help/command/export.rst @@ -54,10 +54,7 @@ The options are: to support consumers using CMake versions older than 2.8.12. ``CXX_MODULES_DIRECTORY <directory>`` - - .. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` + .. versionadded:: 3.28 Export C++ module properties to files under the given directory. Each file will be named according to the target's export name (without any namespace). diff --git a/Help/command/install.rst b/Help/command/install.rst index 4de3ce1..b0698dd 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -232,10 +232,7 @@ Signatures would be installed to ``myproj/here.h`` below the destination. ``CXX_MODULES_BMI`` - - .. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` + .. versionadded:: 3.28 Any module files from C++ modules from ``PUBLIC`` sources in a file set of type ``CXX_MODULES`` will be installed to the given ``DESTINATION``. All @@ -843,10 +840,7 @@ Signatures and defines required to use the libraries. ``CXX_MODULES_DIRECTORY`` - - .. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` + .. versionadded:: 3.28 Specify a subdirectory to store C++ module information for targets in the export set. This directory will be populated with files which add the diff --git a/Help/command/target_sources.rst b/Help/command/target_sources.rst index 86bf7fb..40755c5 100644 --- a/Help/command/target_sources.rst +++ b/Help/command/target_sources.rst @@ -84,10 +84,7 @@ files within those directories. The acceptable types include: Sources intended to be used via a language's ``#include`` mechanism. ``CXX_MODULES`` - - .. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` + .. versionadded:: 3.28 Sources which contain C++ interface module or partition units (i.e., those using the ``export`` keyword). This file set type may not have an diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst index bc2b0af..0255b4d9 100644 --- a/Help/command/try_compile.rst +++ b/Help/command/try_compile.rst @@ -261,14 +261,11 @@ The options for the above signatures are: Sources are not added to any ``FILE_SET`` in the generated project. ``CXX_MODULE`` + .. versionadded:: 3.28 + Sources are added to a ``FILE_SET`` of type ``CXX_MODULES`` in the generated project. - .. note :: - - Experimental. Sources of type ``CXX_MODULE`` are gated by - ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` - The default type of sources is ``NORMAL``. ``<LANG>_STANDARD <std>`` diff --git a/Help/dev/experimental.rst b/Help/dev/experimental.rst index 046d214..87ac031 100644 --- a/Help/dev/experimental.rst +++ b/Help/dev/experimental.rst @@ -13,133 +13,3 @@ specific values will change over time to reinforce their experimental nature. When used, a warning will be generated to indicate that an experimental feature is in use and that the affected behavior in the project is not part of CMake's stability guarantees. - -C++20 Module APIs -================= - -Variable: ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` -Value: ``ac01f462-0f5f-432a-86aa-acef252918a6`` - -In order to support C++20 modules, there are a number of behaviors that have -CMake APIs to provide the required features to build and export them from a -project. - -Limitations ------------ - -There are a number of known limitations of the current C++20 module support in -CMake. This does not document known limitations or bugs in compilers as these -can change over time. - -For all generators: - -- Only in-project modules may be used. While there is some support for - exporting module information, there is no mechanism for using it at the - moment. - -For the Ninja Generators: - -- ``ninja`` 1.10 or newer is required. - -For the Visual Studio Generators: - -- Only Visual Studio 2022 and toolchains newer than 19.34 (Visual Studio - 17.4). -- No support for exporting or installing BMI or module information. -- No diagnosis of using modules provided by ``PRIVATE`` sources from - ``PUBLIC`` module sources. - -C++20 Module Dependencies -========================= - -The Ninja generator has experimental infrastructure supporting C++20 module -dependency scanning. This is similar to the Fortran modules support, but -relies on external tools to scan C++20 translation units for module -dependencies. The approach is described by Kitware's `D1483r1`_ paper. - -In order to activate CMake's experimental support for C++20 module -dependencies, set the following variables: - -``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` - Set this to the UUID documented above. - -Some compilers already have support for module dependency scanning: - -* MSVC 19.34 and newer (provided with Visual Studio 17.4 and newer) -* LLVM/Clang 16.0 and newer - -For those, only the above variables need to be set by project code. -For compilers with in-development support, additional variables must -be set as follows. - -``CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE`` - Set this to tell CMake how to invoke the C++20 module dependency - scanning tool. - -``CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT`` - Set this for compilers that generate module maps. See below. - -``CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG`` - Set this for compilers that generate module maps. See below. - -For example, add code like the following to a test project: - -.. code-block:: cmake - - string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE - "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> <SOURCE>" - " -MT <DYNDEP_FILE> -MD -MF <DEP_FILE>" - " ${flags_to_scan_deps} -fdep-file=<DYNDEP_FILE> -fdep-output=<OBJECT>" - ) - -The tool specified by ``CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE`` is -expected to process the translation unit, write preprocessor dependencies -to the file specified by the ``<DEP_FILE>`` placeholder, and write module -dependencies to the file specified by the ``<DYNDEP_FILE>`` placeholder. The -``CMAKE_EXPERIMENTAL_CXX_SCANDEP_DEPFILE_FORMAT`` file may be set to ``msvc`` -for scandep rules which use ``msvc``-style dependency reporting. - -In order to support ``IMPORTED`` targets with associated C++20 module sources, -the ``CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG`` variable must be provided -to have the compiler only output a BMI instead of a BMI and an object file. - -The module dependencies should be written in the format described -by the `P1689r5`_ paper. - -Compiler writers may try out their scanning functionality using -the `cxx-modules-sandbox`_ test project, modified to set variables -as above for their compiler. - -For compilers that generate module maps, tell CMake as follows: - -.. code-block:: cmake - - set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "gcc") - set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG - "${compiler_flags_for_module_map} -fmodule-mapper=<MODULE_MAP_FILE>") - set(CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG - "-fmodule-only") - -Currently, the only supported formats are, ``clang``, ``gcc``, and ``msvc``. -The ``gcc`` format is described in the GCC documentation, but the relevant -section for the purposes of CMake is: - - A mapping file consisting of space-separated module-name, filename - pairs, one per line. Only the mappings for the direct imports and any - module export name need be provided. If other mappings are provided, - they override those stored in any imported CMI files. A repository - root may be specified in the mapping file by using ``$root`` as the - module name in the first active line. - - -- GCC module mapper documentation - -The ``msvc`` format is a response file containing flags required to compile -any module interfaces properly as well as find any required files to satisfy -``import`` statements as required for Microsoft's Visual Studio toolchains. - -Similarly, the ``clang`` format is a response file containing flags using -Clang's module flags. - -.. _`D1483r1`: https://mathstuf.fedorapeople.org/fortran-modules/fortran-modules.html -.. _`P1689r5`: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html -.. _`cxx-modules-sandbox`: https://github.com/mathstuf/cxx-modules-sandbox diff --git a/Help/index.rst b/Help/index.rst index 16c8f25..ca03213 100644 --- a/Help/index.rst +++ b/Help/index.rst @@ -58,6 +58,7 @@ Reference Manuals /manual/cmake-commands.7 /manual/cmake-compile-features.7 /manual/cmake-configure-log.7 + /manual/cmake-cxxmodules.7 /manual/cmake-developer.7 /manual/cmake-env-variables.7 /manual/cmake-file-api.7 diff --git a/Help/manual/OPTIONS_HELP.txt b/Help/manual/OPTIONS_HELP.txt index 78ee245..f4f2dbe 100644 --- a/Help/manual/OPTIONS_HELP.txt +++ b/Help/manual/OPTIONS_HELP.txt @@ -11,6 +11,21 @@ Usage describes the basic command line interface and its options. +.. option:: --help <keyword> [<file>] + + Print help for one CMake keyword. + + ``<keyword>`` can be a property, variable, command, policy, generator + or module. + + The relevant manual entry for ``<keyword>`` is + printed in a human-readable text format. + |file| + + .. versionchanged:: 3.28 + + Prior to CMake 3.28, this option supported command names only. + .. option:: --help-full [<file>] Print all help manuals and exit. diff --git a/Help/manual/cmake-cxxmodules.7.rst b/Help/manual/cmake-cxxmodules.7.rst new file mode 100644 index 0000000..5776421 --- /dev/null +++ b/Help/manual/cmake-cxxmodules.7.rst @@ -0,0 +1,72 @@ +.. cmake-manual-description: CMake C++ Modules Support Reference + +cmake-cxxmodules(7) +******************* + +.. versionadded:: 3.28 + +C++ 20 introduced the concept of "modules" to the language. The design +requires build systems to order compilations among each other to satisfy +``import`` statements reliably. CMake's implementation asks the compiler +to scan source files for module dependencies during the build, collates +scanning results to infer ordering constraints, and tells the build tool +how to dynamically update the build graph. + +Scanning Control +================ + +Whether or not sources get scanned for C++ module usage is dependent on the +following queries. The first query that provides a yes/no answer is used. + +- If the source file belongs to a file set of type ``CXX_MODULES``, it will + be scanned. +- If the target does not use at least C++ 20, it will not be scanned. +- If the source file is not the language ``CXX``, it will not be scanned. +- If the :prop_sf:`CXX_SCAN_FOR_MODULES` source file property is set, its + value will be used. +- If the :prop_tgt:`CXX_SCAN_FOR_MODULES` target property is set, its value + will be used. Set the :variable:`CMAKE_CXX_SCAN_FOR_MODULES` variable + to initialize this property on all targets as they are created. +- Otherwise, the source file will be scanned. See policy :policy:`CMP0155`. + +Compiler Support +================ + +Compilers which CMake natively supports module dependency scanning include: + +* MSVC toolset 14.34 and newer (provided with Visual Studio 17.4 and newer) +* LLVM/Clang 16.0 and newer +* GCC 14 (for the in-development branch, after 2023-09-20) and newer + +Generator Support +================= + +The list of generators which support scanning sources for C++ modules include: + +- :generator:`Ninja` +- :generator:`Ninja Multi-Config` +- :generator:`Visual Studio 17 2022` + +Limitations +----------- + +There are a number of known limitations of the current C++ module support in +CMake. This does not document known limitations or bugs in compilers as these +can change over time. + +For all generators: + +- Header units are not supported. +- No builtin support for ``import std;`` or other compiler-provided modules. + +For the Ninja Generators: + +- ``ninja`` 1.11 or newer is required. + +For the :ref:`Visual Studio Generators`: + +- Only Visual Studio 2022 and MSVC toolsets 14.34 (Visual Studio + 17.4) and newer. +- No support for exporting or installing BMI or module information. +- No diagnosis of using modules provided by ``PRIVATE`` sources from + ``PUBLIC`` module sources. diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 00d1aa4..d4a43de 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -195,7 +195,7 @@ Two forms of conditional generator expressions are supported: if ``condition`` is ``0``. Any other value for ``condition`` results in an error. - .. versionadded:: 3.28 + .. versionadded:: 3.28 This generator expression short-circuits such that generator expressions in ``false_string`` will not evaluate when ``condition`` is ``1``, and generator @@ -258,7 +258,7 @@ The common boolean logic operators are supported: ``condition`` must be ``0`` or ``1``. The result of the expression is ``0`` if ``condition`` is ``1``, else ``1``. - .. versionadded:: 3.28 +.. versionadded:: 3.28 Logical operators short-circuit such that generator expressions in the arguments list will not be evaluated once a return value can be determined. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index dff4f34..047dfd1 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.28 .. toctree:: :maxdepth: 1 + CMP0155: C++ sources in targets with at least C++20 are scanned for imports. </policy/CMP0155> CMP0154: Generated files are private by default in targets using file sets. </policy/CMP0154> CMP0153: The exec_program command should not be called. </policy/CMP0153> CMP0152: file(REAL_PATH) resolves symlinks before collapsing ../ components. </policy/CMP0152> diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index effe4b1..7009bf1 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -1230,7 +1230,8 @@ Configuration settings include: ``TimeOut`` The default timeout for each test if not specified by the - :prop_test:`TIMEOUT` test property. + :prop_test:`TIMEOUT` test property or the + :option:`--timeout <ctest --timeout>` flag. * `CTest Script`_ variable: :variable:`CTEST_TEST_TIMEOUT` * :module:`CTest` module variable: ``DART_TESTING_TIMEOUT`` diff --git a/Help/policy/CMP0124.rst b/Help/policy/CMP0124.rst index 3935166..d5cde64 100644 --- a/Help/policy/CMP0124.rst +++ b/Help/policy/CMP0124.rst @@ -3,12 +3,44 @@ CMP0124 .. versionadded:: 3.21 -When this policy is set to ``NEW``, the scope of loop variables defined by the -:command:`foreach` command is restricted to the loop only. They will be unset -at the end of the loop. +:command:`foreach` loop variables are only available in the loop scope. -The ``OLD`` behavior for this policy still clears the loop variables at the end -of the loop, but does not unset them. This leaves them as defined, but empty. +CMake 3.20 and below always leave the loop variable set at the end of the +loop, either to the value it had before the loop, if any, or to the empty +string. CMake 3.21 and above prefer to leave the loop variable in the +state it had before the loop started, either set or unset. This policy +provides compatibility for projects that expect the loop variable to always +be left set. + +The ``OLD`` behavior for this policy is to set the loop variable at the +end of the loop, either to its original value, or to an empty value. +The ``NEW`` behavior for this policy is to restore the loop variable to +the state it had before the loop started, either set or unset. + +For example: + +.. code-block:: cmake + + set(items a b c) + + set(var1 "value") + unset(var2) + + foreach(var1 IN LISTS items) + endforeach() + + foreach(var2 IN LISTS items) + endforeach() + + if(DEFINED var1) + message("var1: ${var1}") + endif() + if(DEFINED var2) + message("var2: ${var2}") + endif() + +Under the ``OLD`` behavior, this code prints ``var1: value`` and ``var2:``. +Under the ``NEW`` behavior, this code prints only ``var1: value``. This policy was introduced in CMake version 3.21. Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. diff --git a/Help/policy/CMP0153.rst b/Help/policy/CMP0153.rst index 4c9f3dc..838f082 100644 --- a/Help/policy/CMP0153.rst +++ b/Help/policy/CMP0153.rst @@ -1,6 +1,8 @@ CMP0153 ------- +.. versionadded:: 3.28 + The :command:`exec_program` command should not be called. This command has long been superseded by the :command:`execute_process` diff --git a/Help/policy/CMP0155.rst b/Help/policy/CMP0155.rst new file mode 100644 index 0000000..2dafadf --- /dev/null +++ b/Help/policy/CMP0155.rst @@ -0,0 +1,26 @@ +CMP0155 +------- + +.. versionadded:: 3.28 + +C++ sources in targets with at least C++20 are scanned for imports. + +CMake 3.27 and below assume that C++ sources do not ``import`` modules. +CMake 3.28 and above prefer to assume that C++ sources in targets using C++20 +or higher might ``import`` modules, and must be scanned before compiling, +unless explicitly disabled. This policy provides compatibility for projects +that use C++20 or higher, without modules, that have not been updated to turn +off scanning, e.g., via the :variable:`CMAKE_CXX_SCAN_FOR_MODULES` variable. +See the :manual:`cmake-cxxmodules(7)` manual for more details on C++ module +support. + +The ``OLD`` behavior for this policy is to assume that C++ 20 and newer +sources do not import modules. The ``NEW`` behavior for this policy is to +assume that C++ 20 and newer files may import modules, and need to be scanned. + +This policy was introduced in CMake version 3.28. Use the +:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +Unlike many policies, CMake version |release| does *not* warn +when this policy is not set and simply uses ``OLD`` behavior. + +.. include:: DEPRECATED.txt diff --git a/Help/prop_sf/CXX_SCAN_FOR_MODULES.rst b/Help/prop_sf/CXX_SCAN_FOR_MODULES.rst index 5b704dc..d10969a 100644 --- a/Help/prop_sf/CXX_SCAN_FOR_MODULES.rst +++ b/Help/prop_sf/CXX_SCAN_FOR_MODULES.rst @@ -1,7 +1,7 @@ CXX_SCAN_FOR_MODULES -------------------- -.. versionadded:: 3.26 +.. versionadded:: 3.28 ``CXX_SCAN_FOR_MODULES`` is a boolean specifying whether CMake will scan the source for C++ module dependencies. See also the @@ -16,8 +16,3 @@ consulted. Note that scanning is only performed if C++20 or higher is enabled for the target and the source uses the ``CXX`` language. Scanning for modules in sources belonging to file sets of type ``CXX_MODULES`` is always performed. - -.. note :: - - This setting is meaningful only when experimental support for C++ modules - has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` gate. diff --git a/Help/prop_tgt/CXX_MODULE_DIRS.rst b/Help/prop_tgt/CXX_MODULE_DIRS.rst index a32b5b1..6c5dd3a 100644 --- a/Help/prop_tgt/CXX_MODULE_DIRS.rst +++ b/Help/prop_tgt/CXX_MODULE_DIRS.rst @@ -1,11 +1,7 @@ CXX_MODULE_DIRS --------------- -.. versionadded:: 3.25 - -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` +.. versionadded:: 3.28 Semicolon-separated list of base directories of the target's default C++ module set (i.e. the file set with name and type ``CXX_MODULES``). The diff --git a/Help/prop_tgt/CXX_MODULE_DIRS_NAME.rst b/Help/prop_tgt/CXX_MODULE_DIRS_NAME.rst index 9190991..8b6e4dd 100644 --- a/Help/prop_tgt/CXX_MODULE_DIRS_NAME.rst +++ b/Help/prop_tgt/CXX_MODULE_DIRS_NAME.rst @@ -1,11 +1,7 @@ CXX_MODULE_DIRS_<NAME> ---------------------- -.. versionadded:: 3.25 - -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` +.. versionadded:: 3.28 Semicolon-separated list of base directories of the target's ``<NAME>`` C++ module set, which has the set type ``CXX_MODULES``. The property supports diff --git a/Help/prop_tgt/CXX_MODULE_SET.rst b/Help/prop_tgt/CXX_MODULE_SET.rst index f5cd8b2..851de86 100644 --- a/Help/prop_tgt/CXX_MODULE_SET.rst +++ b/Help/prop_tgt/CXX_MODULE_SET.rst @@ -1,11 +1,7 @@ CXX_MODULE_SET -------------- -.. versionadded:: 3.25 - -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` +.. versionadded:: 3.28 Semicolon-separated list of files in the target's default C++ module set, (i.e. the file set with name and type ``CXX_MODULES``). If any of the paths diff --git a/Help/prop_tgt/CXX_MODULE_SETS.rst b/Help/prop_tgt/CXX_MODULE_SETS.rst index 0e8945a..2165027 100644 --- a/Help/prop_tgt/CXX_MODULE_SETS.rst +++ b/Help/prop_tgt/CXX_MODULE_SETS.rst @@ -1,11 +1,7 @@ CXX_MODULE_SETS --------------- -.. versionadded:: 3.25 - -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` +.. versionadded:: 3.28 Read-only list of the target's ``PRIVATE`` and ``PUBLIC`` C++ module sets (i.e. all file sets with the type ``CXX_MODULES``). Files listed in these file sets diff --git a/Help/prop_tgt/CXX_MODULE_SET_NAME.rst b/Help/prop_tgt/CXX_MODULE_SET_NAME.rst index 5674c99..e73e28a 100644 --- a/Help/prop_tgt/CXX_MODULE_SET_NAME.rst +++ b/Help/prop_tgt/CXX_MODULE_SET_NAME.rst @@ -1,11 +1,7 @@ CXX_MODULE_SET_<NAME> --------------------- -.. versionadded:: 3.25 - -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` +.. versionadded:: 3.28 Semicolon-separated list of files in the target's ``<NAME>`` C++ module set, which has the set type ``CXX_MODULES``. If any of the paths are relative, they diff --git a/Help/prop_tgt/CXX_SCAN_FOR_MODULES.rst b/Help/prop_tgt/CXX_SCAN_FOR_MODULES.rst index 93a1b73..791914e 100644 --- a/Help/prop_tgt/CXX_SCAN_FOR_MODULES.rst +++ b/Help/prop_tgt/CXX_SCAN_FOR_MODULES.rst @@ -1,7 +1,7 @@ CXX_SCAN_FOR_MODULES -------------------- -.. versionadded:: 3.26 +.. versionadded:: 3.28 ``CXX_SCAN_FOR_MODULES`` is a boolean specifying whether CMake will scan C++ sources in the target for module dependencies. See also the @@ -20,8 +20,3 @@ scan the target's ``CXX`` sources at build time. Note that scanning is only performed if C++20 or higher is enabled for the target. Scanning for modules in the target's sources belonging to file sets of type ``CXX_MODULES`` is always performed. - -.. note :: - - This setting is meaningful only when experimental support for C++ modules - has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` gate. diff --git a/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS.rst b/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS.rst index 88687b2..b068191 100644 --- a/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS.rst +++ b/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS.rst @@ -3,10 +3,6 @@ IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS .. versionadded:: 3.28 -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` - Preprocessor definitions for compiling an ``IMPORTED`` target's C++ module sources. diff --git a/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_FEATURES.rst b/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_FEATURES.rst index c3eb7fb..cea359f 100644 --- a/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_FEATURES.rst +++ b/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_FEATURES.rst @@ -3,10 +3,6 @@ IMPORTED_CXX_MODULES_COMPILE_FEATURES .. versionadded:: 3.28 -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` - Compiler features enabled for this ``IMPORTED`` target's C++ modules. The value of this property is used by the generators to set the include diff --git a/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_OPTIONS.rst b/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_OPTIONS.rst index 5c62c77..cf7bc5b 100644 --- a/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_OPTIONS.rst +++ b/Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_OPTIONS.rst @@ -3,10 +3,6 @@ IMPORTED_CXX_MODULES_COMPILE_OPTIONS .. versionadded:: 3.28 -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` - List of options to pass to the compiler for this ``IMPORTED`` target's C++ modules. diff --git a/Help/prop_tgt/IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES.rst b/Help/prop_tgt/IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES.rst index 08a993d..46d74ea 100644 --- a/Help/prop_tgt/IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES.rst +++ b/Help/prop_tgt/IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES.rst @@ -3,10 +3,6 @@ IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES .. versionadded:: 3.28 -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` - List of preprocessor include file search directories when compiling C++ modules for ``IMPORTED`` targets. diff --git a/Help/prop_tgt/IMPORTED_CXX_MODULES_LINK_LIBRARIES.rst b/Help/prop_tgt/IMPORTED_CXX_MODULES_LINK_LIBRARIES.rst index 5111dc5..ff5cec8 100644 --- a/Help/prop_tgt/IMPORTED_CXX_MODULES_LINK_LIBRARIES.rst +++ b/Help/prop_tgt/IMPORTED_CXX_MODULES_LINK_LIBRARIES.rst @@ -3,9 +3,5 @@ IMPORTED_CXX_MODULES_LINK_LIBRARIES .. versionadded:: 3.28 -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` - List of direct dependencies to use for usage requirements for C++ modules in the target's C++ modules. diff --git a/Help/prop_tgt/INTERFACE_CXX_MODULE_SETS.rst b/Help/prop_tgt/INTERFACE_CXX_MODULE_SETS.rst index c7ed46d..fd6e34b 100644 --- a/Help/prop_tgt/INTERFACE_CXX_MODULE_SETS.rst +++ b/Help/prop_tgt/INTERFACE_CXX_MODULE_SETS.rst @@ -1,11 +1,7 @@ INTERFACE_CXX_MODULE_SETS ------------------------- -.. versionadded:: 3.25 - -.. note :: - - Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` +.. versionadded:: 3.28 Read-only list of the target's ``PUBLIC`` C++ module sets (i.e. all file sets with the type ``CXX_MODULES``). Files listed in these C++ module sets can be diff --git a/Help/release/3.28.rst b/Help/release/3.28.rst new file mode 100644 index 0000000..200c0a3 --- /dev/null +++ b/Help/release/3.28.rst @@ -0,0 +1,203 @@ +CMake 3.28 Release Notes +************************ + +.. only:: html + + .. contents:: + +Changes made since CMake 3.27 include the following. + +New Features +============ + +Languages +--------- + +* C++ 20 named modules are now supported by :ref:`Ninja Generators` + and :ref:`Visual Studio Generators` for VS 2022 and newer, in combination + with the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang + 16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and newer. + See :manual:`cmake-cxxmodules(7)` for details. + +* ``HIP`` language code may now be compiled for NVIDIA GPUs + using the NVIDIA CUDA Compiler (NVCC). + See the :variable:`CMAKE_HIP_PLATFORM` variable. + +Platforms +--------- + +* On Apple platforms, ``.xcframework`` folders are now supported: + + * The :command:`find_library` command now finds ``.xcframework`` folders. + + * The :command:`target_link_libraries` command now supports + linking against a ``.xcframework`` folder. + + * The :prop_tgt:`IMPORTED_LOCATION` target property of an imported + library target may now be the path to a ``.xcframework`` folder. + +* Apple visionOS and its ``xros`` and ``xrsimulator`` SDKs are now supported. + Compiling for Apple visionOS can be requested by setting + :variable:`CMAKE_SYSTEM_NAME` to ``visionOS``. + See :ref:`Cross Compiling for iOS, tvOS, visionOS, or watchOS` + for more information. + +Presets +------- + +* :manual:`cmake-presets(7)` files now support schema version ``8``. + It adds support for a ``$schema`` field. + +Compilers +--------- + +* Cray Clang-based compilers are now supported with + :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``CrayClang``. + +* The OrangeC compiler is now supported with + :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``OrangeC``. + +Commands +-------- + +* The :command:`add_custom_command` and :command:`add_custom_target` + commands gained a ``JOB_SERVER_AWARE`` option. + +* The :command:`cmake_host_system_information` command gained a + ``MSYSTEM_PREFIX`` query for the installation prefix of a MSYS + or MinGW development environment on Windows hosts. + +* The :command:`set_property` command ``TEST`` mode gained a ``DIRECTORY`` + option to set properties on tests in other directories. + +* The :command:`set_tests_properties` command gained a ``DIRECTORY`` + option to set properties on tests in other directories. + +* The :command:`get_property` command ``TEST`` mode gained a ``DIRECTORY`` + option to get properties on tests in other directories. + +* The :command:`get_test_property` command gained a ``DIRECTORY`` + option to get properties on tests in other directories. + +Variables +--------- + +* The :envvar:`CMAKE_CROSSCOMPILING_EMULATOR` environment variable + was added to initialize the :variable:`CMAKE_CROSSCOMPILING_EMULATOR` + cache variable. + +* The :variable:`CMAKE_HIP_PLATFORM` variable was added to specify + the GPU platform for which HIP language sources are to be compiled + (``amd`` or ``nvidia``). + +Properties +---------- + +* On imported shared libraries, the :prop_tgt:`IMPORTED_IMPLIB` target + property may now be used without :prop_tgt:`IMPORTED_LOCATION`. + This can be used to represent a stub library whose location should not + be added as a runtime search path to dependents that link it. + +* The :prop_tgt:`IMPORTED_LOCATION` property of a macOS framework + may now be a path to the ``.framework`` folder itself. + +* The :prop_tgt:`XCODE_EMBED_RESOURCES <XCODE_EMBED_<type>>` target property + was added to tell the :generator:`Xcode` generator what targets to put in + the ``Embed Resources`` build phase. + +Modules +------- + +* The :module:`ExternalProject` module now includes the + ``BUILD_JOB_SERVER_AWARE`` option for the + :command:`ExternalProject_Add` command. This option enables + the integration of the GNU Make job server when using an + explicit ``BUILD_COMMAND`` with certain :ref:`Makefile Generators`. + 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 + :command:`FetchContent_MakeAvailable` for the dependency. + +* The :module:`FindCURL` module gained a ``CURL_USE_STATIC_LIBS`` hint + to select static libraries. + +* The :module:`FindEXPAT` module gained an ``EXPAT_USE_STATIC_LIBS`` hint + to select static libraries. + +* The :module:`FindPkgConfig` module :command:`pkg_get_variable` command + gained a ``DEFINE_VARIABLES`` option to pass variables to ``pkg-config``. + +Generator Expressions +--------------------- + +* The :manual:`generator expressions <cmake-generator-expressions(7)>` + :genex:`$<IF:...>`, :genex:`$<AND:...>`, and :genex:`$<OR:...>` + short-circuit to avoid unnecessary evaluation of parameters. + +CTest +----- + +* CTest may now take a :ref:`dynamically-generated resource spec file + <ctest-resource-dynamically-generated-spec-file>`, which can be specified by the + :prop_test:`GENERATED_RESOURCE_SPEC_FILE` test property. + +Deprecated and Removed Features +=============================== + +* The :command:`exec_program` command, which has been deprecated + since CMake 3.0, has been removed by policy :policy:`CMP0153`. + Use the :command:`execute_process` command instead. + +* The :generator:`Visual Studio 11 2012` generator has been removed. + +* The :generator:`Visual Studio 12 2013` generator is now deprecated + and will be removed in a future version of CMake. + +* The :prop_tgt:`IOS_INSTALL_COMBINED` target property and corresponding + :variable:`CMAKE_IOS_INSTALL_COMBINED` variable have been deprecated. + Their functionality does not make sense on Apple Silicon hosts. + +* The :generator:`Xcode` generator will now issue a fatal error if + the Legacy Build System has been selected for Xcode 14 and + newer. Those Xcode versions dropped support for the Legacy Build + System and expect the project to be set-up for their current + Build System. + +Other Changes +============= + +* Generated files, in targets using :ref:`file sets`, are now considered + private by default. Generated public headers must be specified using + file sets. This allows :ref:`Ninja Generators` to produce more + efficient build graphs. See policy :policy:`CMP0154`. + +* The :command:`find_library`, :command:`find_path`, and :command:`find_file` + commands no longer search in installation prefixes derived from the ``PATH`` + environment variable. This behavior was added in CMake 3.3 to support + MSYS and MinGW (``MSYSTEM``) development environments on Windows, but + it can search undesired prefixes that happen to be in the ``PATH`` for + unrelated reasons. Users who keep some ``<prefix>/bin`` directories in + the ``PATH`` just for their tools do not necessarily want any corresponding + ``<prefix>/lib`` or ``<prefix>/include`` directories searched. + The behavior was reverted for non-Windows platforms by CMake 3.6. + Now it has been reverted on Windows platforms too. + + One may set the ``CMAKE_PREFIX_PATH`` environment variable with a + :ref:`semicolon-separated list <CMake Language Lists>` of prefixes + that are to be searched. + +* When using MinGW tools in a ``MSYSTEM`` environment on Windows, + the ``$MSYSTEM_PREFIX/local`` and ``$MSYSTEM_PREFIX`` prefixes are + now added to :variable:`CMAKE_SYSTEM_PREFIX_PATH`. + +* The precompiled Linux ``x86_64`` binaries provided on + `cmake.org <https://cmake.org/download/>`_ now require GLIBC 2.17 or higher. diff --git a/Help/release/dev/CMAKE_CROSSCOMPILING_EMULATOR-env-variable.rst b/Help/release/dev/CMAKE_CROSSCOMPILING_EMULATOR-env-variable.rst deleted file mode 100644 index 269e739..0000000 --- a/Help/release/dev/CMAKE_CROSSCOMPILING_EMULATOR-env-variable.rst +++ /dev/null @@ -1,6 +0,0 @@ -CMAKE_CROSSCOMPILING_EMULATOR-env-variable ------------------------------------------- - -* The :envvar:`CMAKE_CROSSCOMPILING_EMULATOR` environment variable - was added to initialize the :variable:`CMAKE_CROSSCOMPILING_EMULATOR` - cache variable. diff --git a/Help/release/dev/CrayClang-compiler.rst b/Help/release/dev/CrayClang-compiler.rst deleted file mode 100644 index ea26b50..0000000 --- a/Help/release/dev/CrayClang-compiler.rst +++ /dev/null @@ -1,5 +0,0 @@ -CrayClang-compiler ------------------- - -* Cray Clang-based compilers are now supported with - :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``CrayClang``. diff --git a/Help/release/dev/ExternalProject-build-jobserver.rst b/Help/release/dev/ExternalProject-build-jobserver.rst deleted file mode 100644 index 357da42..0000000 --- a/Help/release/dev/ExternalProject-build-jobserver.rst +++ /dev/null @@ -1,10 +0,0 @@ -ExternalProject-build-jobserver -------------------------------- - -* The :module:`ExternalProject` module now includes the - ``BUILD_JOB_SERVER_AWARE`` option for the - :command:`ExternalProject_Add` command. This option enables - the integration of the GNU Make job server when using an - explicit ``BUILD_COMMAND`` with certain :ref:`Makefile Generators`. - Additionally, the :command:`ExternalProject_Add_Step` command - has been updated to support the new ``JOB_SERVER_AWARE`` option. diff --git a/Help/release/dev/FetchContent-exclude-from-all.rst b/Help/release/dev/FetchContent-exclude-from-all.rst deleted file mode 100644 index 267ce72..0000000 --- a/Help/release/dev/FetchContent-exclude-from-all.rst +++ /dev/null @@ -1,7 +0,0 @@ -FetchContent-exclude-from-all ------------------------------ - -* 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 - :command:`FetchContent_MakeAvailable` for the dependency. diff --git a/Help/release/dev/FindCURL-static.rst b/Help/release/dev/FindCURL-static.rst deleted file mode 100644 index 3c369d2..0000000 --- a/Help/release/dev/FindCURL-static.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindCURL-static ---------------- - -* The :module:`FindCURL` module gained a ``CURL_USE_STATIC_LIBS`` hint - to select static libraries. diff --git a/Help/release/dev/FindEXPAT-static.rst b/Help/release/dev/FindEXPAT-static.rst deleted file mode 100644 index 8808ebd..0000000 --- a/Help/release/dev/FindEXPAT-static.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindEXPAT-static ----------------- - -* The :module:`FindEXPAT` module gained a ``EXPAT_USE_STATIC_LIBS`` hint - to select static libraries. diff --git a/Help/release/dev/FindPkgConfig-override.rst b/Help/release/dev/FindPkgConfig-override.rst deleted file mode 100644 index 3f58065..0000000 --- a/Help/release/dev/FindPkgConfig-override.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindPkgConfig-override ----------------------- - -* The :module:`FindPkgConfig` module :command:`pkg_get_variable` function - gained a ``DEFINE_VARIABLES`` option to pass variables to ``pkg-config``. diff --git a/Help/release/dev/apple-visionos.rst b/Help/release/dev/apple-visionos.rst deleted file mode 100644 index db76248..0000000 --- a/Help/release/dev/apple-visionos.rst +++ /dev/null @@ -1,7 +0,0 @@ -apple-visionos --------------- - -* CMake learned about Apple visionOS and its `xros` and `xrsimulator` SDKs. - Compiling for Apple visionOS can be requested by setting - :variable:`CMAKE_SYSTEM_NAME` to ``visionOS``. For more - information see :manual:`cmake-toolchains(7)`. diff --git a/Help/release/dev/command-job-server-aware.rst b/Help/release/dev/command-job-server-aware.rst deleted file mode 100644 index 224c739..0000000 --- a/Help/release/dev/command-job-server-aware.rst +++ /dev/null @@ -1,5 +0,0 @@ -command-job-server-aware ------------------------- - -* The :command:`add_custom_command` and :command:`add_custom_target` - commands gained a ``JOB_SERVER_AWARE`` option. diff --git a/Help/release/dev/deprecate-install-combined.rst b/Help/release/dev/deprecate-install-combined.rst deleted file mode 100644 index 12a0a43..0000000 --- a/Help/release/dev/deprecate-install-combined.rst +++ /dev/null @@ -1,6 +0,0 @@ -deprecate-install-combined --------------------------- - -* The :prop_tgt:`IOS_INSTALL_COMBINED` target property and corresponding - :variable:`CMAKE_IOS_INSTALL_COMBINED` variable have been deprecated. - Their functionality does not make sense on Apple Silicon hosts. diff --git a/Help/release/dev/dynamically-generated-resource-spec-file.rst b/Help/release/dev/dynamically-generated-resource-spec-file.rst deleted file mode 100644 index c4b3899..0000000 --- a/Help/release/dev/dynamically-generated-resource-spec-file.rst +++ /dev/null @@ -1,6 +0,0 @@ -dynamically-generated-resource-spec-file ----------------------------------------- - -* CTest may now take a :ref:`dynamically-generated resource spec file - <ctest-resource-dynamically-generated-spec-file>`, which can be specified by the - :prop_test:`GENERATED_RESOURCE_SPEC_FILE` test property. diff --git a/Help/release/dev/exec_program-policy.rst b/Help/release/dev/exec_program-policy.rst deleted file mode 100644 index 8ddae5b..0000000 --- a/Help/release/dev/exec_program-policy.rst +++ /dev/null @@ -1,6 +0,0 @@ -exec_program-policy -------------------- - -* The :command:`exec_program` command, which has been deprecated since CMake - 3.0, has been removed by policy :policy:`CMP0153`. Use the - :command:`execute_process` command instead. diff --git a/Help/release/dev/fileset-private-dep.rst b/Help/release/dev/fileset-private-dep.rst deleted file mode 100644 index 5ffb036..0000000 --- a/Help/release/dev/fileset-private-dep.rst +++ /dev/null @@ -1,7 +0,0 @@ -fileset-private-dep -------------------- - -* Generated files, in targets using :ref:`file sets`, are now considered - private by default. Generated public headers must be specified using - file sets. This allows :ref:`Ninja Generators` to produce more - efficient build graphs. See policy :policy:`CMP0154`. diff --git a/Help/release/dev/find-windows-no-PATH-prefixes.rst b/Help/release/dev/find-windows-no-PATH-prefixes.rst deleted file mode 100644 index b65c00b..0000000 --- a/Help/release/dev/find-windows-no-PATH-prefixes.rst +++ /dev/null @@ -1,17 +0,0 @@ -find-windows-no-PATH-prefixes ------------------------------ - -* The :command:`find_library`, :command:`find_path`, and :command:`find_file` - commands no longer search in installation prefixes derived from the ``PATH`` - environment variable. This behavior was added in CMake 3.3 to support - MSYS and MinGW (``MSYSTEM``) development environments on Windows, but - it can search undesired prefixes that happen to be in the ``PATH`` for - unrelated reasons. Users that keep some ``<prefix>/bin`` directories in - the ``PATH`` just for their tools do not necessarily want any corresponding - ``<prefix>/lib`` or ``<prefix>/include`` directories searched. - The behavior was reverted for non-Windows platforms by CMake 3.6. - Now it has been reverted on Windows platforms too. - - One may set the ``CMAKE_PREFIX_PATH`` environment variable with a - :ref:`semicolon-separated list <CMake Language Lists>` of prefixes - that are to be searched. diff --git a/Help/release/dev/genexp-no-eval.rst b/Help/release/dev/genexp-no-eval.rst deleted file mode 100644 index 42ff1aa..0000000 --- a/Help/release/dev/genexp-no-eval.rst +++ /dev/null @@ -1,5 +0,0 @@ -genexp-no-eval --------------- - -* :manual:`generator expressions <cmake-generator-expressions(7)>` - short-circuit to avoid unnecessary evaluation of parameters. diff --git a/Help/release/dev/hip-nvidia.rst b/Help/release/dev/hip-nvidia.rst deleted file mode 100644 index 1d9814e..0000000 --- a/Help/release/dev/hip-nvidia.rst +++ /dev/null @@ -1,9 +0,0 @@ -hip-nvidia ----------- - -* ``HIP`` language code may now be compiled for NVIDIA GPUs - using the NVIDIA CUDA Compiler (NVCC). - -* The :variable:`CMAKE_HIP_PLATFORM` variable was added to specify - the GPU platform for which HIP language sources are to be compiled - (``amd`` or ``nvidia``). diff --git a/Help/release/dev/host-msystem-prefix.rst b/Help/release/dev/host-msystem-prefix.rst deleted file mode 100644 index 4377144..0000000 --- a/Help/release/dev/host-msystem-prefix.rst +++ /dev/null @@ -1,6 +0,0 @@ -host-msystem-prefix -------------------- - -* The :command:`cmake_host_system_information` command gained a - ``MSYSTEM_PREFIX`` query for the installation prefix of a MSYS - or MinGW development environment on Windows hosts. diff --git a/Help/release/dev/imported-implib-only.rst b/Help/release/dev/imported-implib-only.rst deleted file mode 100644 index aa817b7..0000000 --- a/Help/release/dev/imported-implib-only.rst +++ /dev/null @@ -1,7 +0,0 @@ -imported-implib-only --------------------- - -* On imported shared libraries, the :prop_tgt:`IMPORTED_IMPLIB` target - property may now be used without :prop_tgt:`IMPORTED_LOCATION`. - This can be used to represent a stub library whose location should not - be added as a runtime search path to dependents that link it. diff --git a/Help/release/dev/imported-target-framework-path.rst b/Help/release/dev/imported-target-framework-path.rst deleted file mode 100644 index 68c3431..0000000 --- a/Help/release/dev/imported-target-framework-path.rst +++ /dev/null @@ -1,5 +0,0 @@ -imported-target-framework-path ------------------------------- - -* The :prop_tgt:`IMPORTED_LOCATION` property of a macOS framework may now be - the location of the framework folder itself. diff --git a/Help/release/dev/mingw-search-prefixes.rst b/Help/release/dev/mingw-search-prefixes.rst deleted file mode 100644 index 1b5c3c7..0000000 --- a/Help/release/dev/mingw-search-prefixes.rst +++ /dev/null @@ -1,6 +0,0 @@ -mingw-search-prefixes ---------------------- - -* When using MinGW tools in a ``MSYSTEM`` environment on Windows, - the ``$MSYSTEM_PREFIX/local`` and ``$MSYSTEM_PREFIX`` prefixes are - now added to :variable:`CMAKE_SYSTEM_PREFIX_PATH`. diff --git a/Help/release/dev/orangec-compiler.rst b/Help/release/dev/orangec-compiler.rst deleted file mode 100644 index 9068699..0000000 --- a/Help/release/dev/orangec-compiler.rst +++ /dev/null @@ -1,5 +0,0 @@ -orangec-compiler ----------------- - -* The OrangeC compiler is now supported with - :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``OrangeC``. diff --git a/Help/release/dev/presets-schema.rst b/Help/release/dev/presets-schema.rst deleted file mode 100644 index 964373c..0000000 --- a/Help/release/dev/presets-schema.rst +++ /dev/null @@ -1,5 +0,0 @@ -presets-schema --------------- - -* :manual:`cmake-presets(7)` files now support schema version ``8``. - It adds support for a ``$schema`` field. diff --git a/Help/release/dev/rel-linux-x86_64.rst b/Help/release/dev/rel-linux-x86_64.rst deleted file mode 100644 index 8302a1c..0000000 --- a/Help/release/dev/rel-linux-x86_64.rst +++ /dev/null @@ -1,5 +0,0 @@ -rel-linux-x86_64 ----------------- - -* The precompiled Linux ``x86_64`` binaries provided on - `cmake.org <https://cmake.org/download/>`_ now require GLIBC 2.17 or higher. diff --git a/Help/release/dev/remove-vs11-generator.rst b/Help/release/dev/remove-vs11-generator.rst deleted file mode 100644 index 971d679..0000000 --- a/Help/release/dev/remove-vs11-generator.rst +++ /dev/null @@ -1,4 +0,0 @@ -remove-vs11-generator ---------------------- - -* The :generator:`Visual Studio 11 2012` generator has been removed. diff --git a/Help/release/dev/test-properties-directory.rst b/Help/release/dev/test-properties-directory.rst deleted file mode 100644 index 9df7051..0000000 --- a/Help/release/dev/test-properties-directory.rst +++ /dev/null @@ -1,15 +0,0 @@ -test-properties-directory -------------------------- - -* The ``TEST`` mode of the :command:`set_property` command gained a - ``DIRECTORY`` sub-option, which allows you to set properties on tests in - other directories. -* The :command:`set_tests_properties` command gained a ``DIRECTORY`` - sub-option, which allows you to set properties on tests in other - directories. -* The ``TEST`` mode of the :command:`get_property` command gained a - ``DIRECTORY`` sub-option, which allows you to get properties on tests in - other directories. -* The :command:`get_test_property` command gained a ``DIRECTORY`` - sub-option, which allows you to get properties on tests in other - directories. diff --git a/Help/release/dev/vs12-deprecate.rst b/Help/release/dev/vs12-deprecate.rst deleted file mode 100644 index 23d7e2a..0000000 --- a/Help/release/dev/vs12-deprecate.rst +++ /dev/null @@ -1,5 +0,0 @@ -vs12-deprecate --------------- - -* The :generator:`Visual Studio 12 2013` generator is now deprecated - and will be removed in a future version of CMake. diff --git a/Help/release/dev/xcframework-find-library.rst b/Help/release/dev/xcframework-find-library.rst deleted file mode 100644 index 527270e..0000000 --- a/Help/release/dev/xcframework-find-library.rst +++ /dev/null @@ -1,5 +0,0 @@ -xcframework-find-library ------------------------- - -* The :command:`find_library` command can now find ``.xcframework`` folders on - Apple platforms. diff --git a/Help/release/dev/xcframework-target-link-libraries.rst b/Help/release/dev/xcframework-target-link-libraries.rst deleted file mode 100644 index 7edded5..0000000 --- a/Help/release/dev/xcframework-target-link-libraries.rst +++ /dev/null @@ -1,7 +0,0 @@ -xcframework-target-link-libraries ---------------------------------- - -* Targets may now link against an ``.xcframework`` folder in - :command:`target_link_libraries`. -* The :prop_tgt:`IMPORTED_LOCATION` property of a target may now be an - ``.xcframework`` folder. diff --git a/Help/release/dev/xcode-embed-resources.rst b/Help/release/dev/xcode-embed-resources.rst deleted file mode 100644 index 2678cfd..0000000 --- a/Help/release/dev/xcode-embed-resources.rst +++ /dev/null @@ -1,6 +0,0 @@ -xcode-embed-resources ---------------------- - -* The :prop_tgt:`XCODE_EMBED_RESOURCES <XCODE_EMBED_<type>>` target property - was added to tell the :generator:`Xcode` generator what targets to put in - the ``Embed Resources`` build phase. diff --git a/Help/release/dev/xcode-no-legacy-buildsystem.rst b/Help/release/dev/xcode-no-legacy-buildsystem.rst deleted file mode 100644 index f3d1f67..0000000 --- a/Help/release/dev/xcode-no-legacy-buildsystem.rst +++ /dev/null @@ -1,8 +0,0 @@ -xcode-no-legacy-buildsystem ---------------------------- - -* The :generator:`Xcode` generator will now issue a fatal error if - the Legacy Build System has been selected for Xcode 14 and - newer. Those Xcode versions dropped support for the Legacy Build - System and expect the project being set-up for their current - Build System. diff --git a/Help/release/index.rst b/Help/release/index.rst index 3851b7e..ea13fdc 100644 --- a/Help/release/index.rst +++ b/Help/release/index.rst @@ -15,6 +15,7 @@ Releases .. toctree:: :maxdepth: 1 + 3.28 <3.28> 3.27 <3.27> 3.26 <3.26> 3.25 <3.25> diff --git a/Help/variable/CMAKE_CXX_SCAN_FOR_MODULES.rst b/Help/variable/CMAKE_CXX_SCAN_FOR_MODULES.rst index a40bf75..28601ba 100644 --- a/Help/variable/CMAKE_CXX_SCAN_FOR_MODULES.rst +++ b/Help/variable/CMAKE_CXX_SCAN_FOR_MODULES.rst @@ -1,15 +1,10 @@ CMAKE_CXX_SCAN_FOR_MODULES -------------------------- -.. versionadded:: 3.26 +.. versionadded:: 3.28 Whether to scan C++ source files for module dependencies. This variable is used to initialize the :prop_tgt:`CXX_SCAN_FOR_MODULES` property on all the targets. See that target property for additional information. - -.. note :: - - This setting is meaningful only when experimental support for C++ modules - has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` gate. diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 1167ba8..c0d2356 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -32,7 +32,7 @@ endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU") - string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE + string(CONCAT CMAKE_CXX_SCANDEP_SOURCE "\"${CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS}\"" " -format=p1689" " --" @@ -41,8 +41,8 @@ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) " -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>") - set(CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG "--precompile") + set(CMAKE_CXX_MODULE_MAP_FORMAT "clang") + set(CMAKE_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>") + set(CMAKE_CXX_MODULE_BMI_ONLY_FLAG "--precompile") endif() endif() diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake index c276f4e..2e1b4ad 100644 --- a/Modules/Compiler/GNU-CXX.cmake +++ b/Modules/Compiler/GNU-CXX.cmake @@ -74,13 +74,13 @@ endif() __compiler_check_default_language_standard(CXX 3.4 98 6.0 14 11.1 17) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0) - string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE + string(CONCAT CMAKE_CXX_SCANDEP_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E -x c++ <SOURCE>" " -MT <DYNDEP_FILE> -MD -MF <DEP_FILE>" " -fmodules-ts -fdeps-file=<DYNDEP_FILE> -fdeps-target=<OBJECT> -fdeps-format=p1689r5" " -o <PREPROCESSED_SOURCE>") - set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "gcc") - string(CONCAT CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG + set(CMAKE_CXX_MODULE_MAP_FORMAT "gcc") + string(CONCAT CMAKE_CXX_MODULE_MAP_FLAG # Turn on modules. "-fmodules-ts" # Read the module mapper file. @@ -91,5 +91,5 @@ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0) " -fdeps-format=p1689r5" # Force C++ as a language. " -x c++") - set(CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG "-fmodule-only") + set(CMAKE_CXX_MODULE_BMI_ONLY_FLAG "-fmodule-only") endif() diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake index b03f826..79cd2e0 100644 --- a/Modules/Compiler/MSVC-CXX.cmake +++ b/Modules/Compiler/MSVC-CXX.cmake @@ -79,13 +79,13 @@ elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) endif() if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.34") - string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE + string(CONCAT CMAKE_CXX_SCANDEP_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> <SOURCE> -nologo -TP" " -showIncludes" " -scanDependencies <DYNDEP_FILE>" " -Fo<OBJECT>") - set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_DEPFILE_FORMAT "msvc") - set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "msvc") - set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>") - set(CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG "-ifcOnly;-ifcOutput;<OBJECT>") + set(CMAKE_CXX_SCANDEP_DEPFILE_FORMAT "msvc") + set(CMAKE_CXX_MODULE_MAP_FORMAT "msvc") + set(CMAKE_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>") + set(CMAKE_CXX_MODULE_BMI_ONLY_FLAG "-ifcOnly;-ifcOutput;<OBJECT>") endif () diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 36eb70e..f43f48d 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -2825,6 +2825,7 @@ 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}) @@ -3105,14 +3106,16 @@ hash=${hash} get_filename_component(fname "${fname}" NAME) else() # Fall back to a default file name. The actual file name does not - # 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") + # 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") 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} @@ -3289,6 +3292,7 @@ hash=${hash} COMMAND ${__cmdQuoted} WORKING_DIRECTORY \${work_dir} DEPENDS \${depends} + BYPRODUCTS \${byproduct_file} DEPENDEES mkdir ${log} ${uses_terminal} diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index 12aca8d..bd9e0ec 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -514,7 +514,7 @@ Result variables executable ``nvcc``. ``CUDAToolkit_INCLUDE_DIRS`` - The path to the CUDA Toolkit ``include`` folder containing the header files + List of paths to all the CUDA Toolkit folders containing header files required to compile a project linking against CUDA. ``CUDAToolkit_LIBRARY_DIR`` @@ -579,13 +579,28 @@ Result variables # ############################################################################### +function(_CUDAToolkit_build_include_dirs result_variable default_paths_variable) + set(content "${${default_paths_variable}}") + set(${result_variable} "${content}" PARENT_SCOPE) +endfunction() + +function(_CUDAToolkit_build_library_dirs result_variable default_paths_variable) + set(content "${${default_paths_variable}}") + set(${result_variable} "${content}" PARENT_SCOPE) +endfunction() + # The toolkit is located during compiler detection for CUDA and stored in CMakeCUDACompiler.cmake as -# CMAKE_CUDA_COMPILER_TOOLKIT_ROOT and CMAKE_CUDA_COMPILER_LIBRARY_ROOT. +# - CMAKE_CUDA_COMPILER_TOOLKIT_ROOT +# - CMAKE_CUDA_COMPILER_LIBRARY_ROOT +# - CMAKE_CUDA_COMPILER_LIBRARY_DIRECTORIES_FROM_IMPLICIT_LIBRARIES +# - CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES # We compute the rest based on those here to avoid re-searching and to avoid finding a possibly # different installation. if(CMAKE_CUDA_COMPILER_TOOLKIT_ROOT) set(CUDAToolkit_ROOT_DIR "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}") set(CUDAToolkit_LIBRARY_ROOT "${CMAKE_CUDA_COMPILER_LIBRARY_ROOT}") + _CUDAToolkit_build_library_dirs(CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES) + _CUDAToolkit_build_include_dirs(CUDAToolkit_INCLUDE_DIRECTORIES CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES) set(CUDAToolkit_BIN_DIR "${CUDAToolkit_ROOT_DIR}/bin") set(CUDAToolkit_NVCC_EXECUTABLE "${CUDAToolkit_BIN_DIR}/nvcc${CMAKE_EXECUTABLE_SUFFIX}") set(CUDAToolkit_VERSION "${CMAKE_CUDA_COMPILER_TOOLKIT_VERSION}") @@ -622,11 +637,45 @@ else() # NVIDIA HPC SDK, and distro's splayed layouts execute_process(COMMAND ${CUDAToolkit_NVCC_EXECUTABLE} "-v" "__cmake_determine_cuda" OUTPUT_VARIABLE _CUDA_NVCC_OUT ERROR_VARIABLE _CUDA_NVCC_OUT) + message(CONFIGURE_LOG + "Executed nvcc to extract CUDAToolkit information:\n${_CUDA_NVCC_OUT}\n\n") if(_CUDA_NVCC_OUT MATCHES "\\#\\$ TOP=([^\r\n]*)") get_filename_component(CUDAToolkit_BIN_DIR "${CMAKE_MATCH_1}/bin" ABSOLUTE) + message(CONFIGURE_LOG + "Parsed CUDAToolkit nvcc location:\n${CUDAToolkit_BIN_DIR}\n\n") else() get_filename_component(CUDAToolkit_BIN_DIR "${CUDAToolkit_NVCC_EXECUTABLE}" DIRECTORY) endif() + if(_CUDA_NVCC_OUT MATCHES "\\#\\$ INCLUDES=([^\r\n]*)") + separate_arguments(_nvcc_output NATIVE_COMMAND "${CMAKE_MATCH_1}") + foreach(line IN LISTS _nvcc_output) + string(REGEX REPLACE "^-I" "" line "${line}") + get_filename_component(line "${line}" ABSOLUTE) + list(APPEND _cmake_CUDAToolkit_include_directories "${line}") + endforeach() + message(CONFIGURE_LOG + "Parsed CUDAToolkit nvcc implicit include information:\n${_cmake_CUDAToolkit_include_directories}\n\n") + + set(_cmake_CUDAToolkit_include_directories "${_cmake_CUDAToolkit_include_directories}" CACHE INTERNAL "CUDAToolkit internal list of include directories") + endif() + if(_CUDA_NVCC_OUT MATCHES "\\#\\$ LIBRARIES=([^\r\n]*)") + include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake) + set(_nvcc_link_line "cuda-fake-ld ${CMAKE_MATCH_1}") + CMAKE_PARSE_IMPLICIT_LINK_INFO("${_nvcc_link_line}" + _cmake_CUDAToolkit_implicit_link_libs + _cmake_CUDAToolkit_implicit_link_directories + _cmake_CUDAToolkit_implicit_frameworks + _nvcc_log + "${CMAKE_CUDA_IMPLICIT_OBJECT_REGEX}" + LANGUAGE CUDA) + message(CONFIGURE_LOG + "Parsed CUDAToolkit nvcc implicit link information:\n${_nvcc_log}\n${_cmake_CUDAToolkit_implicit_link_directories}\n\n") + unset(_nvcc_link_line) + unset(_cmake_CUDAToolkit_implicit_link_libs) + unset(_cmake_CUDAToolkit_implicit_frameworks) + + set(_cmake_CUDAToolkit_implicit_link_directories "${_cmake_CUDAToolkit_implicit_link_directories}" CACHE INTERNAL "CUDAToolkit internal list of implicit link directories") + endif() unset(_CUDA_NVCC_OUT) set(CUDAToolkit_BIN_DIR "${CUDAToolkit_BIN_DIR}" CACHE PATH "" FORCE) @@ -642,6 +691,15 @@ else() endif() endif() + if(DEFINED _cmake_CUDAToolkit_include_directories) + _CUDAToolkit_build_include_dirs(_cmake_CUDAToolkit_contents _cmake_CUDAToolkit_include_directories) + set(CUDAToolkit_INCLUDE_DIRECTORIES "${_cmake_CUDAToolkit_contents}" PARENT_SCOPE) + endif() + if(DEFINED _cmake_CUDAToolkit_implicit_link_directories) + _CUDAToolkit_build_library_dirs(_cmake_CUDAToolkit_contents _cmake_CUDAToolkit_implicit_link_directories) + set(CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES "${_cmake_CUDAToolkit_contents}" PARENT_SCOPE) + endif() + if(CUDAToolkit_BIN_DIR) get_filename_component(CUDAToolkit_ROOT_DIR ${CUDAToolkit_BIN_DIR} DIRECTORY ABSOLUTE) set(CUDAToolkit_ROOT_DIR "${CUDAToolkit_ROOT_DIR}" PARENT_SCOPE) @@ -885,18 +943,27 @@ if(NOT CUDAToolkit_TARGET_DIR) set(_CUDAToolkit_Pop_Prefix True) endif() -# CUDAToolkit_TARGET_DIR always points to the directory containing the include directory. -# On a scattered installation /usr, on a non-scattered something like /usr/local/cuda or /usr/local/cuda-10.2/targets/aarch64-linux. -if(EXISTS "${CUDAToolkit_TARGET_DIR}/include/cuda_runtime.h") - set(CUDAToolkit_INCLUDE_DIR "${CUDAToolkit_TARGET_DIR}/include") -elseif(NOT CUDAToolkit_FIND_QUIETLY) - message(STATUS "Unable to find cuda_runtime.h in \"${CUDAToolkit_TARGET_DIR}/include\" for CUDAToolkit_INCLUDE_DIR.") + +# We don't need to verify the cuda_runtime header when we are using `nvcc` include paths +# as the compiler being enabled means the header was found +if(NOT CUDAToolkit_INCLUDE_DIRECTORIES) + # Otherwise use CUDAToolkit_TARGET_DIR to guess where the `cuda_runtime.h` is located + # On a scattered installation /usr, on a non-scattered something like /usr/local/cuda or /usr/local/cuda-10.2/targets/aarch64-linux. + if(EXISTS "${CUDAToolkit_TARGET_DIR}/include/cuda_runtime.h") + set(CUDAToolkit_INCLUDE_DIRECTORIES "${CUDAToolkit_TARGET_DIR}/include") + else() + message(STATUS "Unable to find cuda_runtime.h in \"${CUDAToolkit_TARGET_DIR}/include\" for CUDAToolkit_INCLUDE_DIRECTORIES.") + endif() endif() # The NVHPC layout moves math library headers and libraries to a sibling directory and it could be nested under # the version of the CUDA toolchain # Create a separate variable so this directory can be selectively added to math targets. -if(NOT EXISTS "${CUDAToolkit_INCLUDE_DIR}/cublas_v2.h") +find_path(CUDAToolkit_CUBLAS_INCLUDE_DIR cublas_v2.h PATHS + "${CUDAToolkit_INCLUDE_DIRECTORIES}" + NO_DEFAULT_PATH) + +if(NOT CUDAToolkit_CUBLAS_INCLUDE_DIR) file(REAL_PATH "${CUDAToolkit_TARGET_DIR}" CUDAToolkit_MATH_INCLUDE_DIR) cmake_path(APPEND CUDAToolkit_MATH_INCLUDE_DIR "../../math_libs/") if(EXISTS "${CUDAToolkit_MATH_INCLUDE_DIR}/${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}/") @@ -905,22 +972,26 @@ if(NOT EXISTS "${CUDAToolkit_INCLUDE_DIR}/cublas_v2.h") cmake_path(APPEND CUDAToolkit_MATH_INCLUDE_DIR "include") cmake_path(NORMAL_PATH CUDAToolkit_MATH_INCLUDE_DIR) - if(NOT EXISTS "${CUDAToolkit_MATH_INCLUDE_DIR}/cublas_v2.h") - if(NOT CUDAToolkit_FIND_QUIETLY) - message(STATUS "Unable to find cublas_v2.h in either \"${CUDAToolkit_INCLUDE_DIR}\" or \"${CUDAToolkit_MATH_INCLUDE_DIR}\"") - endif() - unset(CUDAToolkit_MATH_INCLUDE_DIR) + find_path(CUDAToolkit_CUBLAS_INCLUDE_DIR cublas_v2.h PATHS + "${CUDAToolkit_INCLUDE_DIRECTORIES}" + ) + if(CUDAToolkit_CUBLAS_INCLUDE_DIR) + list(APPEND CUDAToolkit_INCLUDE_DIRECTORIES "${CUDAToolkit_CUBLAS_INCLUDE_DIR}") endif() endif() +unset(CUDAToolkit_CUBLAS_INCLUDE_DIR CACHE) +unset(CUDAToolkit_CUBLAS_INCLUDE_DIR) # Find the CUDA Runtime Library libcudart find_library(CUDA_CUDART NAMES cudart + PATHS ${CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES} PATH_SUFFIXES lib64 lib/x64 ) find_library(CUDA_CUDART NAMES cudart - PATH_SUFFIXES lib64/stubs lib/x64/stubs + PATHS ${CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES} + PATH_SUFFIXES lib64/stubs lib/x64/stubs lib/stubs stubs ) if(NOT CUDA_CUDART AND NOT CUDAToolkit_FIND_QUIETLY) @@ -937,7 +1008,7 @@ endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args(CUDAToolkit REQUIRED_VARS - CUDAToolkit_INCLUDE_DIR + CUDAToolkit_INCLUDE_DIRECTORIES CUDA_CUDART CUDAToolkit_BIN_DIR VERSION_VAR @@ -946,7 +1017,6 @@ find_package_handle_standard_args(CUDAToolkit unset(CUDAToolkit_ROOT_DIR) mark_as_advanced(CUDA_CUDART - CUDAToolkit_INCLUDE_DIR CUDAToolkit_NVCC_EXECUTABLE CUDAToolkit_SENTINEL_FILE ) @@ -954,7 +1024,7 @@ mark_as_advanced(CUDA_CUDART #----------------------------------------------------------------------------- # Construct result variables if(CUDAToolkit_FOUND) - set(CUDAToolkit_INCLUDE_DIRS ${CUDAToolkit_INCLUDE_DIR}) + set(CUDAToolkit_INCLUDE_DIRS "${CUDAToolkit_INCLUDE_DIRECTORIES}") get_filename_component(CUDAToolkit_LIBRARY_DIR ${CUDA_CUDART} DIRECTORY ABSOLUTE) # Build search paths without any symlinks @@ -976,6 +1046,10 @@ if(CUDAToolkit_FOUND) endblock() endif() + if(DEFINED CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES) + list(APPEND CUDAToolkit_LIBRARY_SEARCH_DIRS "${CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES}") + endif() + # If no `CUDAToolkit_LIBRARY_ROOT` exists set it based on CUDAToolkit_LIBRARY_DIR if(NOT DEFINED CUDAToolkit_LIBRARY_ROOT) foreach(CUDAToolkit_search_loc IN LISTS CUDAToolkit_LIBRARY_DIR CUDAToolkit_BIN_DIR) @@ -989,7 +1063,8 @@ if(CUDAToolkit_FOUND) unset(CUDAToolkit_possible_lib_root) endif() endif() - +unset(CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES) +unset(CUDAToolkit_INCLUDE_DIRECTORIES) #----------------------------------------------------------------------------- # Construct import targets @@ -1257,6 +1332,7 @@ if(CUDAToolkit_FOUND) _CUDAToolkit_find_and_add_import_lib(OpenCL) endif() +unset(CUDAToolkit_LIBRARY_SEARCH_DIRS) if(_CUDAToolkit_Pop_ROOT_PATH) list(REMOVE_AT CMAKE_FIND_ROOT_PATH 0) unset(_CUDAToolkit_Pop_ROOT_PATH) diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake index 6e970e8..84bc1ed 100644 --- a/Modules/FindPostgreSQL.cmake +++ b/Modules/FindPostgreSQL.cmake @@ -53,7 +53,7 @@ is set regardless of the presence of the ``Server`` component in find_package ca # In Windows the default installation of PostgreSQL uses that as part of the path. # E.g C:\Program Files\PostgreSQL\8.4. # Currently, the following version numbers are known to this module: -# "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0" +# "16" "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0" # # To use this variable just do something like this: # set(PostgreSQL_ADDITIONAL_VERSIONS "9.2" "8.4.4") @@ -102,7 +102,7 @@ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to wher set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS} - "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") + "16" "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") # Define additional search paths for root directories. set( PostgreSQL_ROOT_DIRECTORIES diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 3154ad3..9174bee 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -36,7 +36,7 @@ Qt Build Tools ^^^^^^^^^^^^^^ Qt relies on some bundled tools for code generation, such as ``moc`` for -meta-object code generation,``uic`` for widget layout and population, +meta-object code generation, ``uic`` for widget layout and population, and ``rcc`` for virtual filesystem content generation. These tools may be automatically invoked by :manual:`cmake(1)` if the appropriate conditions are met. See :manual:`cmake-qt(7)` for more. diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 23556d9..f09989b 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 27) -set(CMake_VERSION_PATCH 20230928) +set(CMake_VERSION_MINOR 28) +set(CMake_VERSION_PATCH 20231004) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 4c57cf6..8ceb9db 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -791,11 +791,12 @@ bool cmCTestRunTest::ForkProcess() timeout = this->CTest->GetGlobalTimeout(); } - // Check CTEST_TEST_TIMEOUT. - cmDuration ctestTestTimeout = this->CTest->GetTimeOut(); - if (ctestTestTimeout > cmDuration::zero() && - (!timeout || ctestTestTimeout < *timeout)) { - timeout = ctestTestTimeout; + if (!timeout) { + // Check CTEST_TEST_TIMEOUT. + cmDuration ctestTestTimeout = this->CTest->GetTimeOut(); + if (ctestTestTimeout > cmDuration::zero()) { + timeout = ctestTestTimeout; + } } } diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index ee40bd5..67462f5 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -235,25 +235,16 @@ ArgumentParser::Continue cmCoreTryCompile::Arguments::SetSourceType( this->SourceTypeContext = SourceType::Normal; matched = true; } else if (sourceType == "CXX_MODULE"_s) { - bool const supportCxxModuleSources = cmExperimental::HasSupportEnabled( - *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi); - if (supportCxxModuleSources) { - this->SourceTypeContext = SourceType::CxxModule; - matched = true; - } + this->SourceTypeContext = SourceType::CxxModule; + matched = true; } if (!matched && this->SourceTypeError.empty()) { - bool const supportCxxModuleSources = cmExperimental::HasSupportEnabled( - *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi); - auto const* message = "'SOURCE'"; - if (supportCxxModuleSources) { - message = "one of 'SOURCE' or 'CXX_MODULE'"; - } // Only remember one error at a time; all other errors related to argument // parsing are "indicate one error and return" anyways. this->SourceTypeError = - cmStrCat("Invalid 'SOURCE_TYPE' '", sourceType, "'; must be ", message); + cmStrCat("Invalid 'SOURCE_TYPE' '", sourceType, + "'; must be one of 'SOURCE' or 'CXX_MODULE'"); } return ArgumentParser::Continue::Yes; } @@ -880,6 +871,13 @@ cm::optional<cmTryCompileResult> cmCoreTryCompile::TryCompileCode( ? "NEW" : "OLD"); + /* Set the appropriate policy information for C++ module support */ + fprintf(fout, "cmake_policy(SET CMP0155 %s)\n", + this->Makefile->GetPolicyStatus(cmPolicies::CMP0155) == + cmPolicies::NEW + ? "NEW" + : "OLD"); + // Workaround for -Wl,-headerpad_max_install_names issue until we can avoid // adding that flag in the platform and compiler language files fprintf(fout, diff --git a/Source/cmDebugTools.h b/Source/cmDebugTools.h new file mode 100644 index 0000000..99c0c6b --- /dev/null +++ b/Source/cmDebugTools.h @@ -0,0 +1,23 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#pragma once + +#include <iostream> + +#define CM_DBG(expr) cm::dbg_impl(__FILE__, __LINE__, #expr, expr) + +namespace cm { + +namespace { + +template <typename T> +T dbg_impl(const char* fname, int line, const char* expr, T value) +{ + std::cerr << fname << ':' << line << ": " << expr << " = " << value + << std::endl; + return value; +} + +} // namespace + +} // namespace cm diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 77c5295..db2a606 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -9,17 +9,20 @@ #include "cmsys/FStream.hxx" #include "cmsys/Glob.hxx" +#include "cmsys/RegularExpression.hxx" #include "cmDocumentationEntry.h" #include "cmDocumentationSection.h" #include "cmRST.h" +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include "cmVersion.h" namespace { -const cmDocumentationEntry cmDocumentationStandardOptions[20] = { +const cmDocumentationEntry cmDocumentationStandardOptions[21] = { { "-h,-H,--help,-help,-usage,/?", "Print usage information and exit." }, { "--version,-version,/V [<file>]", "Print version number and exit." }, + { "--help <keyword> [<file>]", "Print help for one keyword and exit." }, { "--help-full [<file>]", "Print all help manuals and exit." }, { "--help-manual <man> [<file>]", "Print one help manual and exit." }, { "--help-manual-list [<file>]", "List help manuals available and exit." }, @@ -92,6 +95,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os) return this->PrintHelp(os); case cmDocumentation::Full: return this->PrintHelpFull(os); + case cmDocumentation::OneArbitrary: + return this->PrintHelpOneArbitrary(os); case cmDocumentation::OneManual: return this->PrintHelpOneManual(os); case cmDocumentation::OneCommand: @@ -176,6 +181,30 @@ void cmDocumentation::WarnFormFromFilename( } } +std::string cmDocumentation::GeneralizeKeyword(std::string cname) +{ + std::map<std::string, const std::vector<std::string>> conversions; + std::vector<std::string> languages = { + "C", "CXX", "CSharp", "CUDA", "OBJC", + "OBJCXX", "Fortran", "HIP", "ISPC", "Swift", + "ASM", "ASM_NASM", "ASM_MARMASM", "ASM_MASM", "ASM-ATT" + }; + std::vector<std::string> configs = { "DEBUG", "RELEASE", "RELWITHDEBINFO", + "MINSIZEREL" }; + conversions.emplace("LANG", std::move(languages)); + conversions.emplace("CONFIG", std::move(configs)); + for (auto const& it : conversions) { + for (auto const& to_replace : it.second) { + cmsys::RegularExpression reg( + cmStrCat("(^|_)(", to_replace, ")(\\.|$|_)")); + if (reg.find(cname)) { + cname.replace(reg.start(2), to_replace.length(), it.first); + } + } + } + return cname; +} + void cmDocumentation::addCommonStandardDocSections() { cmDocumentationSection sec{ "Options" }; @@ -237,10 +266,10 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv, (strcmp(argv[i], "-h") == 0) || (strcmp(argv[i], "-H") == 0)) { help.HelpType = cmDocumentation::Help; i += int(get_opt_argument(i + 1, help.Argument)); - help.Argument = cmSystemTools::LowerCase(help.Argument); - // special case for single command + // special case for arbitrary keyword help if (!help.Argument.empty()) { - help.HelpType = cmDocumentation::OneCommand; + help.HelpType = cmDocumentation::OneArbitrary; + i += int(get_opt_argument(i + 1, help.Filename)); } } else if (strcmp(argv[i], "--help-properties") == 0) { help.HelpType = cmDocumentation::OneManual; @@ -400,7 +429,7 @@ void cmDocumentation::GlobHelp(std::vector<std::string>& files, { cmsys::Glob gl; std::string findExpr = - cmSystemTools::GetCMakeRoot() + "/Help/" + pattern + ".rst"; + cmStrCat(cmSystemTools::GetCMakeRoot(), "/Help/", pattern, ".rst"); if (gl.FindFiles(findExpr)) { files = gl.GetFiles(); } @@ -452,8 +481,8 @@ bool cmDocumentation::PrintHelpOneManual(std::ostream& os) if (mlen > 3 && mname[mlen - 3] == '(' && mname[mlen - 1] == ')') { mname = mname.substr(0, mlen - 3) + "." + mname[mlen - 2]; } - if (this->PrintFiles(os, "manual/" + mname) || - this->PrintFiles(os, "manual/" + mname + ".[0-9]")) { + if (this->PrintFiles(os, cmStrCat("manual/", mname)) || + this->PrintFiles(os, cmStrCat("manual/", mname, ".[0-9]"))) { return true; } // Argument was not a manual. Complain. @@ -469,10 +498,43 @@ bool cmDocumentation::PrintHelpListManuals(std::ostream& os) return true; } +bool cmDocumentation::PrintHelpOneArbitrary(std::ostream& os) +{ + std::string word = cmSystemTools::HelpFileName(this->CurrentArgument); + std::string word_m = GeneralizeKeyword(word); + + // Support legacy style uppercase commands, with LANG and CONFIG + // substitutions + bool found = this->PrintFiles(os, cmStrCat("*/", word)); + if (found) { + os << "\n"; + } + found = this->PrintFiles( + os, cmStrCat("command/", cmSystemTools::LowerCase(word))) || + found; + if (found) { + return true; + } + found = this->PrintFiles(os, cmStrCat("*/", word_m)); + if (found) { + os << "\n"; + } + found = this->PrintFiles( + os, cmStrCat("command/", cmSystemTools::LowerCase(word_m))) || + found; + if (found) { + return true; + } + os << "Argument \"" << this->CurrentArgument + << "\" to --help did not match any keywords. " + "Use --help without any arguments to print CMake help information.\n"; + return false; +} + bool cmDocumentation::PrintHelpOneCommand(std::ostream& os) { std::string cname = cmSystemTools::LowerCase(this->CurrentArgument); - if (this->PrintFiles(os, "command/" + cname)) { + if (this->PrintFiles(os, cmStrCat("command/", cname))) { return true; } // Argument was not a command. Complain. @@ -491,7 +553,7 @@ bool cmDocumentation::PrintHelpListCommands(std::ostream& os) bool cmDocumentation::PrintHelpOneModule(std::ostream& os) { std::string mname = this->CurrentArgument; - if (this->PrintFiles(os, "module/" + mname)) { + if (this->PrintFiles(os, cmStrCat("module/", mname))) { return true; } // Argument was not a module. Complain. @@ -519,7 +581,7 @@ bool cmDocumentation::PrintHelpListModules(std::ostream& os) bool cmDocumentation::PrintHelpOneProperty(std::ostream& os) { std::string pname = cmSystemTools::HelpFileName(this->CurrentArgument); - if (this->PrintFiles(os, "prop_*/" + pname)) { + if (this->PrintFiles(os, cmStrCat("prop_*/", pname))) { return true; } // Argument was not a property. Complain. @@ -539,7 +601,7 @@ bool cmDocumentation::PrintHelpOnePolicy(std::ostream& os) { std::string pname = this->CurrentArgument; std::vector<std::string> files; - if (this->PrintFiles(os, "policy/" + pname)) { + if (this->PrintFiles(os, cmStrCat("policy/", pname))) { return true; } @@ -567,7 +629,7 @@ bool cmDocumentation::PrintHelpListGenerators(std::ostream& os) bool cmDocumentation::PrintHelpOneVariable(std::ostream& os) { std::string vname = cmSystemTools::HelpFileName(this->CurrentArgument); - if (this->PrintFiles(os, "variable/" + vname)) { + if (this->PrintFiles(os, cmStrCat("variable/", vname))) { return true; } // Argument was not a variable. Complain. diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index 6930986..3e6bdfb 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -34,6 +34,7 @@ public: ListVariables, ListPolicies, ListGenerators, + OneArbitrary, OneManual, OneCommand, OneModule, @@ -118,6 +119,7 @@ private: bool PrintUsage(std::ostream& os); bool PrintHelp(std::ostream& os); bool PrintHelpFull(std::ostream& os); + bool PrintHelpOneArbitrary(std::ostream& os); bool PrintHelpOneManual(std::ostream& os); bool PrintHelpOneCommand(std::ostream& os); bool PrintHelpOneModule(std::ostream& os); @@ -154,4 +156,5 @@ private: cmDocumentationFormatter Formatter; static void WarnFormFromFilename(RequestedHelpItem& request, bool& result); + static std::string GeneralizeKeyword(std::string word); }; diff --git a/Source/cmExperimental.cxx b/Source/cmExperimental.cxx index 104ab81..d75879f 100644 --- a/Source/cmExperimental.cxx +++ b/Source/cmExperimental.cxx @@ -19,17 +19,6 @@ namespace { * up-to-date. */ cmExperimental::FeatureData LookupTable[] = { - // CxxModuleCMakeApi - { "CxxModuleCMakeApi", - "ac01f462-0f5f-432a-86aa-acef252918a6", - "CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API", - "CMake's C++ module support is experimental. It is meant only for " - "experimentation and feedback to CMake developers.", - { "CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE", - "CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT", - "CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG" }, - cmExperimental::TryCompileCondition::SkipCompilerChecks, - false }, // WindowsKernelModeDriver { "WindowsKernelModeDriver", "5c2d848d-4efa-4529-a768-efd57171bf68", diff --git a/Source/cmExperimental.h b/Source/cmExperimental.h index c958ab6..e4c1448 100644 --- a/Source/cmExperimental.h +++ b/Source/cmExperimental.h @@ -15,7 +15,6 @@ class cmExperimental public: enum class Feature { - CxxModuleCMakeApi, WindowsKernelModeDriver, Sentinel, diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 273296d..e78b869 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -16,7 +16,6 @@ #include "cmArgumentParserTypes.h" #include "cmCryptoHash.h" #include "cmExecutionStatus.h" -#include "cmExperimental.h" #include "cmExportBuildAndroidMKGenerator.h" #include "cmExportBuildFileGenerator.h" #include "cmExportSet.h" @@ -69,15 +68,11 @@ bool cmExportCommand(std::vector<std::string> const& args, bool ExportOld = false; }; - auto parser = cmArgumentParser<Arguments>{} - .Bind("NAMESPACE"_s, &Arguments::Namespace) - .Bind("FILE"_s, &Arguments::Filename); - - bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled( - status.GetMakefile(), cmExperimental::Feature::CxxModuleCMakeApi); - if (supportCxx20FileSetTypes) { - parser.Bind("CXX_MODULES_DIRECTORY"_s, &Arguments::CxxModulesDirectory); - } + auto parser = + cmArgumentParser<Arguments>{} + .Bind("NAMESPACE"_s, &Arguments::Namespace) + .Bind("FILE"_s, &Arguments::Filename) + .Bind("CXX_MODULES_DIRECTORY"_s, &Arguments::CxxModulesDirectory); if (args[0] == "EXPORT") { parser.Bind("EXPORT"_s, &Arguments::ExportSetName); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 04d7bb1..422d927 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -31,7 +31,6 @@ #include "cmCustomCommandGenerator.h" #include "cmCxxModuleUsageEffects.h" #include "cmEvaluatedTargetProperty.h" -#include "cmExperimental.h" #include "cmFileSet.h" #include "cmFileTimes.h" #include "cmGeneratedFileStream.h" @@ -9047,7 +9046,7 @@ std::string cmGeneratorTarget::GetImportedXcFrameworkPath( bool cmGeneratorTarget::HaveFortranSources(std::string const& config) const { - auto sources = cmGeneratorTarget::GetSourceFiles(config); + auto sources = this->GetSourceFiles(config); return std::any_of(sources.begin(), sources.end(), [](BT<cmSourceFile*> const& sf) -> bool { return sf.Value->GetLanguage() == "Fortran"_s; @@ -9094,66 +9093,112 @@ cmGeneratorTarget::Cxx20SupportLevel cmGeneratorTarget::HaveCxxModuleSupport( if (!state->GetLanguageEnabled("CXX")) { return Cxx20SupportLevel::MissingCxx; } + cmValue standardDefault = - this->Target->GetMakefile()->GetDefinition("CMAKE_CXX_STANDARD_DEFAULT"); - if (standardDefault && !standardDefault->empty()) { - cmStandardLevelResolver standardResolver(this->Makefile); - if (!standardResolver.HaveStandardAvailable(this, "CXX", config, - "cxx_std_20")) { - return Cxx20SupportLevel::NoCxx20; - } + this->Makefile->GetDefinition("CMAKE_CXX_STANDARD_DEFAULT"); + if (!standardDefault || standardDefault->empty()) { + // We do not know any meaningful C++ standard levels for this compiler. + return Cxx20SupportLevel::NoCxx20; + } + + cmStandardLevelResolver standardResolver(this->Makefile); + if (!standardResolver.HaveStandardAvailable(this, "CXX", config, + "cxx_std_20") || + // During the ABI detection step we do not know the compiler's features. + // HaveStandardAvailable may return true as a fallback, but in this code + // path we do not want to assume C++ 20 is available. + this->Makefile->GetDefinition("CMAKE_CXX20_COMPILE_FEATURES") + .IsEmpty()) { + return Cxx20SupportLevel::NoCxx20; } - // Else, an empty CMAKE_CXX_STANDARD_DEFAULT means CMake does not detect and - // set a default standard level for this compiler, so assume all standards - // are available. - if (!cmExperimental::HasSupportEnabled( - *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi)) { - return Cxx20SupportLevel::MissingExperimentalFlag; + + cmValue scandepRule = + this->Makefile->GetDefinition("CMAKE_CXX_SCANDEP_SOURCE"); + if (!scandepRule) { + return Cxx20SupportLevel::MissingRule; } return Cxx20SupportLevel::Supported; } void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const { + bool haveScannableSources = false; + // Check for `CXX_MODULE*` file sets and a lack of support. if (this->HaveCxx20ModuleSources()) { - switch (this->HaveCxxModuleSupport(config)) { - case cmGeneratorTarget::Cxx20SupportLevel::MissingCxx: - this->Makefile->IssueMessage( - MessageType::FATAL_ERROR, - cmStrCat("The target named \"", this->GetName(), - "\" has C++ sources that export modules but the \"CXX\" " - "language has not been enabled")); - break; - case cmGeneratorTarget::Cxx20SupportLevel::MissingExperimentalFlag: - this->Makefile->IssueMessage( - MessageType::FATAL_ERROR, - cmStrCat("The target named \"", this->GetName(), - "\" has C++ sources that export modules but its " - "experimental support has not been requested")); - break; - case cmGeneratorTarget::Cxx20SupportLevel::NoCxx20: { - cmStandardLevelResolver standardResolver(this->Makefile); - auto effStandard = - standardResolver.GetEffectiveStandard(this, "CXX", config); - if (effStandard.empty()) { - effStandard = "; no C++ standard found"; - } else { - effStandard = cmStrCat("; found \"cxx_std_", effStandard, '"'); - } - this->Makefile->IssueMessage( - MessageType::FATAL_ERROR, - cmStrCat( - "The target named \"", this->GetName(), - "\" has C++ sources that export modules but does not include " - "\"cxx_std_20\" (or newer) among its `target_compile_features`", - effStandard)); - } break; - case cmGeneratorTarget::Cxx20SupportLevel::Supported: - // All is well. - break; + haveScannableSources = true; + } + + if (!haveScannableSources) { + // Check to see if there are regular sources that have requested scanning. + auto sources = this->GetSourceFiles(config); + for (auto const& source : sources) { + auto const* sf = source.Value; + auto const& lang = sf->GetLanguage(); + if (lang != "CXX"_s) { + continue; + } + // Ignore sources which do not need dyndep. + if (this->NeedDyndepForSource(lang, config, sf)) { + haveScannableSources = true; + } } } + + // If there isn't anything scannable, ignore it. + if (!haveScannableSources) { + return; + } + + // If the generator doesn't support modules at all, error that we have + // sources that require the support. + if (!this->GetGlobalGenerator()->CheckCxxModuleSupport()) { + this->Makefile->IssueMessage( + MessageType::FATAL_ERROR, + cmStrCat( + "The target named \"", this->GetName(), + "\" contains C++ " + "sources that use modules which is not supported by the generator")); + return; + } + + switch (this->HaveCxxModuleSupport(config)) { + case cmGeneratorTarget::Cxx20SupportLevel::MissingCxx: + this->Makefile->IssueMessage( + MessageType::FATAL_ERROR, + cmStrCat("The target named \"", this->GetName(), + "\" has C++ sources that use modules but the \"CXX\" " + "language has not been enabled")); + break; + case cmGeneratorTarget::Cxx20SupportLevel::NoCxx20: { + cmStandardLevelResolver standardResolver(this->Makefile); + auto effStandard = + standardResolver.GetEffectiveStandard(this, "CXX", config); + if (effStandard.empty()) { + effStandard = "; no C++ standard found"; + } else { + effStandard = cmStrCat("; found \"cxx_std_", effStandard, '"'); + } + this->Makefile->IssueMessage( + MessageType::FATAL_ERROR, + cmStrCat( + "The target named \"", this->GetName(), + "\" has C++ sources that use modules but does not include " + "\"cxx_std_20\" (or newer) among its `target_compile_features`", + effStandard)); + } break; + case cmGeneratorTarget::Cxx20SupportLevel::MissingRule: { + this->Makefile->IssueMessage( + MessageType::FATAL_ERROR, + cmStrCat("The target named \"", this->GetName(), + "\" has C++ sources that use modules but the compiler does " + "not provide a way to discover the import graph " + "dependencies")); + } break; + case cmGeneratorTarget::Cxx20SupportLevel::Supported: + // All is well. + break; + } } bool cmGeneratorTarget::NeedCxxModuleSupport(std::string const& lang, @@ -9191,14 +9236,30 @@ bool cmGeneratorTarget::NeedDyndepForSource(std::string const& lang, std::string const& config, cmSourceFile const* sf) const { - bool const needDyndep = this->NeedDyndep(lang, config); - if (!needDyndep) { + // Fortran always needs to be scanned. + if (lang == "Fortran"_s) { + return true; + } + // Only C++ code needs scanned otherwise. + if (lang != "CXX"_s) { return false; } + + // Any file in `CXX_MODULES` file sets need scanned (it being `CXX` is + // enforced elsewhere). auto const* fs = this->GetFileSetForSource(config, sf); if (fs && fs->GetType() == "CXX_MODULES"_s) { return true; } + + switch (this->HaveCxxModuleSupport(config)) { + case Cxx20SupportLevel::MissingCxx: + case Cxx20SupportLevel::NoCxx20: + return false; + case Cxx20SupportLevel::MissingRule: + case Cxx20SupportLevel::Supported: + break; + } auto const sfProp = sf->GetProperty("CXX_SCAN_FOR_MODULES"); if (sfProp.IsSet()) { return sfProp.IsOn(); @@ -9207,7 +9268,22 @@ bool cmGeneratorTarget::NeedDyndepForSource(std::string const& lang, if (tgtProp.IsSet()) { return tgtProp.IsOn(); } - return true; + + bool policyAnswer = false; + switch (this->GetPolicyStatusCMP0155()) { + case cmPolicies::WARN: + case cmPolicies::OLD: + // The OLD behavior is to not scan the source. + policyAnswer = false; + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + // The NEW behavior is to scan the source. + policyAnswer = true; + break; + } + return policyAnswer; } void cmGeneratorTarget::BuildFileSetInfoCache(std::string const& config) const diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 751f907..72920d6 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -1288,10 +1288,10 @@ public: { // C++ is not available. MissingCxx, - // The experimental feature is not available. - MissingExperimentalFlag, // The target does not require at least C++20. NoCxx20, + // C++20 module scanning rules are not present. + MissingRule, // C++20 modules are available and working. Supported, }; diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 6953ec6..1abdd0b 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -435,14 +435,6 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( target->CheckCxxModuleStatus(c); } - if (target->HaveCxx20ModuleSources() && !this->SupportsCxxModuleDyndep()) { - root->GetMakefile()->IssueMessage( - MessageType::FATAL_ERROR, - cmStrCat("The target named \"", target->GetName(), - "\" contains C++ sources that export modules which is not " - "supported by the generator")); - } - // handle external vc project files cmValue expath = target->GetProperty("EXTERNAL_MSPROJECT"); if (expath) { diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 90b8839..5076e6c 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1384,14 +1384,6 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget( gtgt->CheckCxxModuleStatus(configName); } - if (gtgt->HaveCxx20ModuleSources()) { - gtgt->Makefile->IssueMessage( - MessageType::FATAL_ERROR, - cmStrCat("The target named \"", gtgt->GetName(), - "\" contains C++ sources that export modules which is not " - "supported by the generator")); - } - auto& gtgt_visited = this->CommandsVisited[gtgt]; auto const& deps = this->GetTargetDirectDepends(gtgt); for (auto const& d : deps) { diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 1b47ec4..0fc4011 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -21,7 +21,6 @@ #include "cmArgumentParser.h" #include "cmArgumentParserTypes.h" #include "cmExecutionStatus.h" -#include "cmExperimental.h" #include "cmExportSet.h" #include "cmFileSet.h" #include "cmGeneratorExpression.h" @@ -491,6 +490,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args, publicHeaderArgs.Parse(argVectors.PublicHeader, &unknownArgs); resourceArgs.Parse(argVectors.Resource, &unknownArgs); includesArgs.Parse(&argVectors.Includes, &unknownArgs); + cxxModuleBmiArgs.Parse(argVectors.CxxModulesBmi, &unknownArgs); for (std::size_t i = 0; i < argVectors.FileSets.size(); i++) { // We have to create a separate object for the parsing because // cmArgumentParser<void>::Bind() binds to a specific address, but the @@ -501,15 +501,6 @@ bool HandleTargetsMode(std::vector<std::string> const& args, fileSetArgs[i] = std::move(fileSetArg); } - bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled( - *helper.Makefile, cmExperimental::Feature::CxxModuleCMakeApi); - if (!supportCxx20FileSetTypes) { - std::copy(argVectors.CxxModulesBmi.begin(), argVectors.CxxModulesBmi.end(), - std::back_inserter(unknownArgs)); - } else { - cxxModuleBmiArgs.Parse(argVectors.CxxModulesBmi, &unknownArgs); - } - if (!unknownArgs.empty()) { // Unknown argument. status.SetError( @@ -541,12 +532,10 @@ bool HandleTargetsMode(std::vector<std::string> const& args, success = success && privateHeaderArgs.Finalize(); success = success && publicHeaderArgs.Finalize(); success = success && resourceArgs.Finalize(); + success = success && cxxModuleBmiArgs.Finalize(); for (auto& fileSetArg : fileSetArgs) { success = success && fileSetArg.Finalize(); } - if (supportCxx20FileSetTypes) { - success = success && cxxModuleBmiArgs.Finalize(); - } if (!success) { return false; @@ -1173,8 +1162,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args, } } - if (supportCxx20FileSetTypes && - !cxxModuleBmiArgs.GetDestination().empty()) { + if (!cxxModuleBmiArgs.GetDestination().empty()) { cxxModuleBmiGenerator = cm::make_unique<cmInstallCxxModuleBmiGenerator>( target.GetName(), helper.GetCxxModulesBmiDestination(&cxxModuleBmiArgs), @@ -2071,12 +2059,7 @@ bool HandleExportMode(std::vector<std::string> const& args, ica.Bind("NAMESPACE"_s, name_space); ica.Bind("EXPORT_LINK_INTERFACE_LIBRARIES"_s, exportOld); ica.Bind("FILE"_s, filename); - - bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled( - *helper.Makefile, cmExperimental::Feature::CxxModuleCMakeApi); - if (supportCxx20FileSetTypes) { - ica.Bind("CXX_MODULES_DIRECTORY"_s, cxx_modules_directory); - } + ica.Bind("CXX_MODULES_DIRECTORY"_s, cxx_modules_directory); std::vector<std::string> unknownArgs; ica.Parse(args, &unknownArgs); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index caa5e67..0c2a719 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -204,14 +204,6 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() { this->GeneratorTarget->CheckCxxModuleStatus(this->GetConfigName()); - if (this->GeneratorTarget->HaveCxx20ModuleSources()) { - this->Makefile->IssueMessage( - MessageType::FATAL_ERROR, - cmStrCat("The target named \"", this->GeneratorTarget->GetName(), - "\" contains C++ sources that export modules which is not " - "supported by the generator")); - } - // -- Write the custom commands for this target // Evaluates generator expressions and expands prop_value diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 193cc0f..0bda945 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -266,7 +266,7 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject( if (!this->GeneratorTarget->Target->IsNormal()) { auto flag = this->GetMakefile()->GetSafeDefinition( - "CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG"); + "CMAKE_CXX_MODULE_BMI_ONLY_FLAG"); cmRulePlaceholderExpander::RuleVariables compileObjectVars; compileObjectVars.Object = objectFileName.c_str(); auto rulePlaceholderExpander = @@ -710,7 +710,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang, } } std::string const modmapFormatVar = - cmStrCat("CMAKE_EXPERIMENTAL_", lang, "_MODULE_MAP_FORMAT"); + cmStrCat("CMAKE_", lang, "_MODULE_MAP_FORMAT"); std::string const modmapFormat = this->Makefile->GetSafeDefinition(modmapFormatVar); @@ -734,7 +734,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang, if (withScanning == WithScanning::Yes) { const auto& scanDepType = this->GetMakefile()->GetSafeDefinition( - cmStrCat("CMAKE_EXPERIMENTAL_", lang, "_SCANDEP_DEPFILE_FORMAT")); + cmStrCat("CMAKE_", lang, "_SCANDEP_DEPFILE_FORMAT")); // Rule to scan dependencies of sources that need preprocessing. { @@ -745,7 +745,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang, scanRuleName = this->LanguageScanRule(lang, config); ppFileName = "$PREPROCESSED_OUTPUT_FILE"; std::string const& scanCommand = mf->GetRequiredDefinition( - cmStrCat("CMAKE_EXPERIMENTAL_", lang, "_SCANDEP_SOURCE")); + cmStrCat("CMAKE_", lang, "_SCANDEP_SOURCE")); scanCommands.assign(scanCommand); for (auto& i : scanCommands) { i = cmStrCat(launcher, i); @@ -893,8 +893,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang, } if (withScanning == WithScanning::Yes && !modmapFormat.empty()) { - std::string modmapFlags = mf->GetRequiredDefinition( - cmStrCat("CMAKE_EXPERIMENTAL_", lang, "_MODULE_MAP_FLAG")); + std::string modmapFlags = + mf->GetRequiredDefinition(cmStrCat("CMAKE_", lang, "_MODULE_MAP_FLAG")); cmSystemTools::ReplaceString(modmapFlags, "<MODULE_MAP_FILE>", "$DYNDEP_MODULE_MAP_FILE"); flags += cmStrCat(' ', modmapFlags); @@ -1143,6 +1143,30 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements( } } + // Detect sources in `CXX_MODULES` which are not compiled. + { + std::vector<cmSourceFile*> sources; + this->GeneratorTarget->GetSourceFiles(sources, config); + for (cmSourceFile const* sf : sources) { + cmFileSet const* fs = + this->GeneratorTarget->GetFileSetForSource(config, sf); + if (!fs) { + continue; + } + if (fs->GetType() != "CXX_MODULES"_s) { + continue; + } + if (sf->GetLanguage().empty()) { + this->GeneratorTarget->Makefile->IssueMessage( + MessageType::FATAL_ERROR, + cmStrCat("Target \"", this->GeneratorTarget->GetName(), + "\" has source file\n ", sf->GetFullPath(), + "\nin a \"FILE_SET TYPE CXX_MODULES\" but it is not " + "scheduled for compilation.")); + } + } + } + for (auto const& langScanningFiles : this->Configs[config].ScanningInfo) { std::string const& language = langScanningFiles.first; std::vector<ScanningFiles> const& scanningFiles = langScanningFiles.second; @@ -1477,7 +1501,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( std::string modmapFormat; if (needDyndep) { std::string const modmapFormatVar = - cmStrCat("CMAKE_EXPERIMENTAL_", language, "_MODULE_MAP_FORMAT"); + cmStrCat("CMAKE_", language, "_MODULE_MAP_FORMAT"); modmapFormat = this->Makefile->GetSafeDefinition(modmapFormatVar); } @@ -1758,7 +1782,7 @@ void cmNinjaTargetGenerator::WriteCxxModuleBmiBuildStatement( std::string modmapFormat; if (true) { std::string const modmapFormatVar = - cmStrCat("CMAKE_EXPERIMENTAL_", language, "_MODULE_MAP_FORMAT"); + cmStrCat("CMAKE_", language, "_MODULE_MAP_FORMAT"); modmapFormat = this->Makefile->GetSafeDefinition(modmapFormatVar); } @@ -1969,12 +1993,12 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( bool const needDyndep = this->GetGeneratorTarget()->NeedDyndep(language, outputConfig); std::string const modmapFormatVar = - cmStrCat("CMAKE_EXPERIMENTAL_", language, "_MODULE_MAP_FORMAT"); + cmStrCat("CMAKE_", language, "_MODULE_MAP_FORMAT"); std::string const modmapFormat = this->Makefile->GetSafeDefinition(modmapFormatVar); if (needDyndep && !modmapFormat.empty()) { std::string modmapFlags = this->GetMakefile()->GetRequiredDefinition( - cmStrCat("CMAKE_EXPERIMENTAL_", language, "_MODULE_MAP_FLAG")); + cmStrCat("CMAKE_", language, "_MODULE_MAP_FLAG")); // XXX(modmap): If changing this path construction, change // `cmGlobalNinjaGenerator::WriteDyndep` and // `cmNinjaTargetGenerator::WriteObjectBuildStatement` to expect the diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index e894073..1ea2ce2 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -469,6 +469,10 @@ class cmMakefile; SELECT( \ POLICY, CMP0154, \ "Generated files are private by default in targets using file sets.", 3, \ + 28, 0, cmPolicies::WARN) \ + SELECT( \ + POLICY, CMP0155, \ + "C++ sources in targets with at least C++20 are scanned for imports", 3, \ 28, 0, cmPolicies::WARN) #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1) @@ -508,7 +512,8 @@ class cmMakefile; F(CMP0119) \ F(CMP0131) \ F(CMP0142) \ - F(CMP0154) + F(CMP0154) \ + F(CMP0155) #define CM_FOR_EACH_CUSTOM_COMMAND_POLICY(F) \ F(CMP0116) \ diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx index 3d484f5..babbaa5 100644 --- a/Source/cmTargetSourcesCommand.cxx +++ b/Source/cmTargetSourcesCommand.cxx @@ -10,7 +10,6 @@ #include "cmArgumentParser.h" #include "cmArgumentParserTypes.h" -#include "cmExperimental.h" #include "cmFileSet.h" #include "cmGeneratorExpression.h" #include "cmList.h" @@ -260,28 +259,18 @@ bool TargetSourcesImpl::HandleOneFileSet( this->SetError("Must specify a TYPE when creating file set"); return false; } - bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled( - *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi); + if (type != "HEADERS"_s && type != "CXX_MODULES"_s) { + this->SetError( + R"(File set TYPE may only be "HEADERS" or "CXX_MODULES")"); + return false; + } - if (supportCxx20FileSetTypes) { - if (type != "HEADERS"_s && type != "CXX_MODULES"_s) { + if (cmFileSetVisibilityIsForInterface(visibility) && + !cmFileSetVisibilityIsForSelf(visibility) && + !this->Target->IsImported()) { + if (type == "CXX_MODULES"_s) { this->SetError( - R"(File set TYPE may only be "HEADERS" or "CXX_MODULES")"); - return false; - } - - if (cmFileSetVisibilityIsForInterface(visibility) && - !cmFileSetVisibilityIsForSelf(visibility) && - !this->Target->IsImported()) { - if (type == "CXX_MODULES"_s) { - this->SetError( - R"(File set TYPE "CXX_MODULES" may not have "INTERFACE" visibility)"); - return false; - } - } - } else { - if (type != "HEADERS"_s) { - this->SetError("File set TYPE may only be \"HEADERS\""); + R"(File set TYPE "CXX_MODULES" may not have "INTERFACE" visibility)"); return false; } } diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2a54a55..ce94fe1 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -362,15 +362,6 @@ void cmVisualStudio10TargetGenerator::Generate() this->GeneratorTarget->CheckCxxModuleStatus(config); } - if (this->GeneratorTarget->HaveCxx20ModuleSources() && - !this->GlobalGenerator->SupportsCxxModuleDyndep()) { - this->Makefile->IssueMessage( - MessageType::FATAL_ERROR, - cmStrCat("The target named \"", this->GeneratorTarget->GetName(), - "\" contains C++ sources that export modules which is not " - "supported by the generator")); - } - this->ProjectType = computeProjectType(this->GeneratorTarget); this->Managed = this->ProjectType == VsProjectType::csproj; const std::string ProjectFileExtension = diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index 225a1e7..b44c8dd 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -11,6 +11,7 @@ set(CMakeLib_TESTS testCTestResourceAllocator.cxx testCTestResourceSpec.cxx testCTestResourceGroups.cxx + testDebug.cxx testGccDepfileReader.cxx testGeneratedFileStream.cxx testJSONHelpers.cxx diff --git a/Tests/CMakeLib/testDebug.cxx b/Tests/CMakeLib/testDebug.cxx new file mode 100644 index 0000000..657ef50 --- /dev/null +++ b/Tests/CMakeLib/testDebug.cxx @@ -0,0 +1,33 @@ +#include <iostream> +#include <string> + +#include "cmDebugTools.h" + +#define check(expr, value) \ + do { \ + if (expr != value) { \ + std::cerr << "Failed to return " #value " for " #expr << std::endl; \ + retval = 1; \ + } \ + } while (false) + +int testDebug(int argc, char** const /*argv*/) +{ + if (argc != 1) { + std::cout << "Invalid arguments.\n"; + return -1; + } + + int retval = 0; + check(CM_DBG(true), true); + check(CM_DBG(4), 4); + check(CM_DBG(1.), 1.); + check(CM_DBG('c'), 'c'); + check(CM_DBG("literal string"), std::string("literal string")); + + std::string str = "std string"; + check(CM_DBG(str), "std string"); + check(CM_DBG(str.empty()), false); + + return retval; +} diff --git a/Tests/Cuda/Toolkit/CMakeLists.txt b/Tests/Cuda/Toolkit/CMakeLists.txt index 8432b71..c2989f0 100644 --- a/Tests/Cuda/Toolkit/CMakeLists.txt +++ b/Tests/Cuda/Toolkit/CMakeLists.txt @@ -26,9 +26,11 @@ set(should_exist CUDAToolkit_LIBRARY_ROOT ) foreach (cuda_loc_var IN LISTS should_exist) - if(NOT EXISTS "${${cuda_loc_var}}") - message(FATAL_ERROR "${cuda_loc_var} variable is expected to be set to valid path") - endif() + foreach (entry IN LISTS ${cuda_loc_var}) + if(NOT EXISTS "${entry}") + message(FATAL_ERROR "${cuda_loc_var} variable is expected to be set to valid path") + endif() + endforeach() endforeach() diff --git a/Tests/CudaOnly/Toolkit/CMakeLists.txt b/Tests/CudaOnly/Toolkit/CMakeLists.txt index e0801a3..506fc9f 100644 --- a/Tests/CudaOnly/Toolkit/CMakeLists.txt +++ b/Tests/CudaOnly/Toolkit/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(CudaOnlyToolkit CUDA) +project(CudaOnlyToolkit LANGUAGES CUDA) find_package(CUDAToolkit REQUIRED) if(NOT DEFINED CUDAToolkit_VERSION) @@ -13,8 +13,22 @@ message(STATUS "CUDAToolkit_VERSION_PATCH: ${CUDAToolkit_VERSION_PATCH}") message(STATUS "CUDAToolkit_BIN_DIR: ${CUDAToolkit_BIN_DIR}") message(STATUS "CUDAToolkit_INCLUDE_DIRS: ${CUDAToolkit_INCLUDE_DIRS}") message(STATUS "CUDAToolkit_LIBRARY_DIR: ${CUDAToolkit_LIBRARY_DIR}") +message(STATUS "CUDAToolkit_LIBRARY_ROOT: ${CUDAToolkit_LIBRARY_ROOT}") message(STATUS "CUDAToolkit_NVCC_EXECUTABLE ${CUDAToolkit_NVCC_EXECUTABLE}") +set(should_exist + CUDAToolkit_BIN_DIR + CUDAToolkit_INCLUDE_DIRS + CUDAToolkit_LIBRARY_DIR + CUDAToolkit_LIBRARY_ROOT + ) +foreach (cuda_loc_var IN LISTS should_exist) + foreach (entry IN LISTS ${cuda_loc_var}) + if(NOT EXISTS "${entry}") + message(FATAL_ERROR "${cuda_loc_var}[${entry}] variable is expected to be set to valid path") + endif() + endforeach() +endforeach() set(cuda_libs cudart cuda_driver cublas cufft cufftw curand cusolver cusparse) if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.1) diff --git a/Tests/RunCMake/CTestTimeout/PropertyOverridesScript-stdout.txt b/Tests/RunCMake/CTestTimeout/FlagOverridesVar-stdout.txt index 6e46485..f580871 100644 --- a/Tests/RunCMake/CTestTimeout/PropertyOverridesScript-stdout.txt +++ b/Tests/RunCMake/CTestTimeout/FlagOverridesVar-stdout.txt @@ -1,5 +1,5 @@ Test project [^ -]*/Tests/RunCMake/CTestTimeout/PropertyOverridesScript-build +]*/Tests/RunCMake/CTestTimeout/FlagOverridesVar-build Start 1: TestTimeout 1/1 Test #1: TestTimeout ...................... Passed +[1-9][0-9.]* sec + diff --git a/Tests/RunCMake/CTestTimeout/PropertyOverridesVar-stdout.txt b/Tests/RunCMake/CTestTimeout/PropertyOverridesVar-stdout.txt new file mode 100644 index 0000000..aeeb3c9 --- /dev/null +++ b/Tests/RunCMake/CTestTimeout/PropertyOverridesVar-stdout.txt @@ -0,0 +1,6 @@ +Test project [^ +]*/Tests/RunCMake/CTestTimeout/PropertyOverridesVar-build + Start 1: TestTimeout +1/1 Test #1: TestTimeout ...................... Passed +[1-9][0-9.]* sec ++ +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake b/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake index 2f9eda1..470bbd8 100644 --- a/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake @@ -92,5 +92,12 @@ block() set(TIMEOUT 4) set(CASE_TEST_PREFIX_CODE "set(CTEST_TEST_TIMEOUT 2)") set(CASE_CMAKELISTS_SUFFIX_CODE "set_property(TEST TestTimeout PROPERTY TIMEOUT 10)\n") - run_ctest_timeout(PropertyOverridesScript) + run_ctest_timeout(PropertyOverridesVar) +endblock() + +block() + set(TIMEOUT 4) + set(CASE_TEST_PREFIX_CODE "set(CTEST_TEST_TIMEOUT 2)") + set(CASE_CMAKELISTS_SUFFIX_CODE "set_property(TEST TestTimeout PROPERTY TIMEOUT)\n") + run_ctest_timeout(FlagOverridesVar --timeout 10000001) endblock() diff --git a/Tests/RunCMake/target_sources/FileSetWrongTypeExperimental-result.txt b/Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/target_sources/FileSetWrongTypeExperimental-result.txt +++ b/Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt b/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt new file mode 100644 index 0000000..39575d4 --- /dev/null +++ b/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt @@ -0,0 +1,8 @@ +(CMake Error in CMakeLists.txt: +( The target named "cmp0155-new" has C\+\+ sources that use modules but the + compiler does not provide a way to discover the import graph dependencies +| The target named "cmp0155-new" contains C\+\+ sources that use modules which + is not supported by the generator +) +)* +CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake b/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake new file mode 100644 index 0000000..bea858b --- /dev/null +++ b/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +unset(CMAKE_CXX_SCANDEP_SOURCE) + +cmake_policy(SET CMP0155 NEW) + +add_executable(cmp0155-new + sources/module-use.cxx) +set_target_properties(cmp0155-new + PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON) diff --git a/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake b/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake new file mode 100644 index 0000000..201598e --- /dev/null +++ b/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +unset(CMAKE_CXX_SCANDEP_SOURCE) + +cmake_policy(SET CMP0155 OLD) + +add_executable(cmp0155-old + sources/module-use.cxx) +set_target_properties(cmp0155-old + PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON) diff --git a/Tests/RunCMake/CXXModules/CMakeLists.txt b/Tests/RunCMake/CXXModules/CMakeLists.txt index e23023d..913371f 100644 --- a/Tests/RunCMake/CXXModules/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/CMakeLists.txt @@ -1,6 +1,4 @@ cmake_minimum_required(VERSION 3.23) project(${RunCMake_TEST} NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt b/Tests/RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt deleted file mode 100644 index 49e869a..0000000 --- a/Tests/RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at ExportBuildCxxModules.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/ExportBuildCxxModules.cmake b/Tests/RunCMake/CXXModules/ExportBuildCxxModules.cmake index eb3a49c..8cee83e 100644 --- a/Tests/RunCMake/CXXModules/ExportBuildCxxModules.cmake +++ b/Tests/RunCMake/CXXModules/ExportBuildCxxModules.cmake @@ -1,5 +1,5 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") add_library(export-modules) target_sources(export-modules diff --git a/Tests/RunCMake/CXXModules/ExportInstallCxxModules-stderr.txt b/Tests/RunCMake/CXXModules/ExportInstallCxxModules-stderr.txt deleted file mode 100644 index 4a6969d..0000000 --- a/Tests/RunCMake/CXXModules/ExportInstallCxxModules-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at ExportInstallCxxModules.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/ExportInstallCxxModules.cmake b/Tests/RunCMake/CXXModules/ExportInstallCxxModules.cmake index b4cb376..24a32a6 100644 --- a/Tests/RunCMake/CXXModules/ExportInstallCxxModules.cmake +++ b/Tests/RunCMake/CXXModules/ExportInstallCxxModules.cmake @@ -1,5 +1,5 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") add_library(export-modules) target_sources(export-modules diff --git a/Tests/RunCMake/CXXModules/FileSetModulesInterface-stderr.txt b/Tests/RunCMake/CXXModules/FileSetModulesInterface-stderr.txt index cb21e2c..7269c65 100644 --- a/Tests/RunCMake/CXXModules/FileSetModulesInterface-stderr.txt +++ b/Tests/RunCMake/CXXModules/FileSetModulesInterface-stderr.txt @@ -1,10 +1,3 @@ -CMake Warning \(dev\) at FileSetModulesInterface.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - CMake Error at FileSetModulesInterface.cmake:[0-9]+ \(target_sources\): target_sources File set TYPE "CXX_MODULES" may not have "INTERFACE" visibility diff --git a/Tests/RunCMake/CXXModules/FileSetModulesInterfaceImported-stderr.txt b/Tests/RunCMake/CXXModules/FileSetModulesInterfaceImported-stderr.txt deleted file mode 100644 index aae763b..0000000 --- a/Tests/RunCMake/CXXModules/FileSetModulesInterfaceImported-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at FileSetModulesInterfaceImported.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt b/Tests/RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt deleted file mode 100644 index a6e778a..0000000 --- a/Tests/RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at FileSetModulesPrivate.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/FileSetModulesPrivate.cmake b/Tests/RunCMake/CXXModules/FileSetModulesPrivate.cmake index 198ae15..83bbd4d 100644 --- a/Tests/RunCMake/CXXModules/FileSetModulesPrivate.cmake +++ b/Tests/RunCMake/CXXModules/FileSetModulesPrivate.cmake @@ -1,5 +1,5 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") add_library(module) target_sources(module diff --git a/Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt b/Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt deleted file mode 100644 index 7fa8aa4..0000000 --- a/Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at FileSetModulesPublic.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/FileSetModulesPublic.cmake b/Tests/RunCMake/CXXModules/FileSetModulesPublic.cmake index 904e42e..52ba35f 100644 --- a/Tests/RunCMake/CXXModules/FileSetModulesPublic.cmake +++ b/Tests/RunCMake/CXXModules/FileSetModulesPublic.cmake @@ -1,5 +1,5 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") add_library(module) target_sources(module diff --git a/Tests/RunCMake/CXXModules/InstallBMI-stderr.txt b/Tests/RunCMake/CXXModules/InstallBMI-stderr.txt deleted file mode 100644 index 0f50963..0000000 --- a/Tests/RunCMake/CXXModules/InstallBMI-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at InstallBMI.cmake:[0-9]+ \(install\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/InstallBMIGenericArgs-stderr.txt b/Tests/RunCMake/CXXModules/InstallBMIGenericArgs-stderr.txt deleted file mode 100644 index 52b9c35..0000000 --- a/Tests/RunCMake/CXXModules/InstallBMIGenericArgs-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at InstallBMIGenericArgs.cmake:[0-9]+ \(install\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/InstallBMIIgnore-stderr.txt b/Tests/RunCMake/CXXModules/InstallBMIIgnore-stderr.txt deleted file mode 100644 index bfff34c..0000000 --- a/Tests/RunCMake/CXXModules/InstallBMIIgnore-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at InstallBMIIgnore.cmake:[0-9]+ \(install\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-stderr.txt b/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-stderr.txt deleted file mode 100644 index e5bd1ec..0000000 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at NinjaDependInfoBMIInstall.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall.cmake b/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall.cmake index 9f8e51a..fd8fd25 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall.cmake +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall.cmake @@ -1,6 +1,6 @@ # Fake out that we have dyndep; we only need to generate, not actually build # here. -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") enable_language(CXX) diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt b/Tests/RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt deleted file mode 100644 index ce0e55a..0000000 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at NinjaDependInfoExport.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoExport.cmake b/Tests/RunCMake/CXXModules/NinjaDependInfoExport.cmake index 0b09d23..a224eca 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoExport.cmake +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoExport.cmake @@ -1,6 +1,6 @@ # Fake out that we have dyndep; we only need to generate, not actually build # here. -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") enable_language(CXX) diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt deleted file mode 100644 index 055e741..0000000 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Warning \(dev\) at NinjaDependInfoFileSet.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake index b50be99..77351bf 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake @@ -1,6 +1,6 @@ # Fake out that we have dyndep; we only need to generate, not actually build # here. -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") enable_language(CXX) diff --git a/Tests/RunCMake/CXXModules/NoCXX-stderr.txt b/Tests/RunCMake/CXXModules/NoCXX-stderr.txt index c261e8c..da65c26 100644 --- a/Tests/RunCMake/CXXModules/NoCXX-stderr.txt +++ b/Tests/RunCMake/CXXModules/NoCXX-stderr.txt @@ -1,20 +1,8 @@ -CMake Warning \(dev\) at NoCXX.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Error in CMakeLists.txt: - The target named "nocxx" has C\+\+ sources that export modules but the "CXX" - language has not been enabled - -( -CMake Error in CMakeLists.txt: -( The target named "nocxx" has C\+\+ sources that export modules but the "CXX" +(CMake Error in CMakeLists.txt: +( The target named "nocxx" has C\+\+ sources that use modules but the "CXX" language has not been enabled -| The target named "nocxx" contains C\+\+ sources that export modules which is - not supported by the generator +| The target named "nocxx" contains C\+\+ sources that use modules which is not + supported by the generator | Target "nocxx" has source file .*/Tests/RunCMake/CXXModules/sources/module.cxx diff --git a/Tests/RunCMake/CXXModules/NoCXX20-stderr.txt b/Tests/RunCMake/CXXModules/NoCXX20-stderr.txt index aba0c89..5a9b6e7 100644 --- a/Tests/RunCMake/CXXModules/NoCXX20-stderr.txt +++ b/Tests/RunCMake/CXXModules/NoCXX20-stderr.txt @@ -1,22 +1,9 @@ -CMake Warning \(dev\) at NoCXX20.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Error in CMakeLists.txt: - The target named "nocxx20" has C\+\+ sources that export modules but does not +(CMake Error in CMakeLists.txt: +( The target named "nocxx20" has C\+\+ sources that use modules but does not include "cxx_std_20" \(or newer\) among its `target_compile_features`; found "cxx_std_17" - -( -CMake Error in CMakeLists.txt: -( The target named "nocxx20" has C\+\+ sources that export modules but does not - include "cxx_std_20" \(or newer\) among its `target_compile_features`; found - "cxx_std_17" -| The target named "nocxx20" contains C\+\+ sources that export modules which - is not supported by the generator +| The target named "nocxx20" contains C\+\+ sources that use modules which is + not supported by the generator ) )* CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag-stderr.txt b/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag-stderr.txt deleted file mode 100644 index 06174b5..0000000 --- a/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag-stderr.txt +++ /dev/null @@ -1,20 +0,0 @@ -CMake Warning \(dev\) at NoCXX20ModuleFlag.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Error in CMakeLists.txt: - The target named "noexperimentalflag" has C\+\+ sources that export modules - but its experimental support has not been requested - -( -CMake Error in CMakeLists.txt: -( The target named "noexperimentalflag" has C\+\+ sources that export modules - but its experimental support has not been requested -| The target named "noexperimentalflag" contains C\+\+ sources that export - modules which is not supported by the generator -) -)* -CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake b/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake deleted file mode 100644 index f6ccb99..0000000 --- a/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake +++ /dev/null @@ -1,14 +0,0 @@ -enable_language(CXX) - -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "echo") - -add_library(noexperimentalflag) -target_sources(noexperimentalflag - PUBLIC - FILE_SET fs TYPE CXX_MODULES FILES - sources/module.cxx) -target_compile_features(noexperimentalflag - PRIVATE - cxx_std_20) - -unset(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API) diff --git a/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt b/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt index 8d15c19..6a9c995 100644 --- a/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt +++ b/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt @@ -1,10 +1,3 @@ -CMake Warning \(dev\) at NoDyndepSupport.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - (CMake Error: The Ninja generator does not support C\+\+20 modules using Ninja version @@ -13,13 +6,13 @@ This warning is for project developers. Use -Wno-dev to suppress it. due to lack of required features. Ninja 1.11 or higher is required. |CMake Error in CMakeLists.txt: - The target named "nodyndep" contains C\+\+ sources that export modules which - is not supported by the generator + The target named "nodyndep" contains C\+\+ sources that use modules which is + not supported by the generator ( CMake Error in CMakeLists.txt: - The target named "nodyndep" contains C\+\+ sources that export modules which - is not supported by the generator + The target named "nodyndep" contains C\+\+ sources that use modules which is + not supported by the generator )*) CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/NoDyndepSupport.cmake b/Tests/RunCMake/CXXModules/NoDyndepSupport.cmake index 71d0f26..6e2d94b 100644 --- a/Tests/RunCMake/CXXModules/NoDyndepSupport.cmake +++ b/Tests/RunCMake/CXXModules/NoDyndepSupport.cmake @@ -1,5 +1,5 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") if (NOT CMAKE_CXX_STANDARD_DEFAULT) set(CMAKE_CXX_STANDARD_DEFAULT "11") diff --git a/Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental-result.txt b/Tests/RunCMake/CXXModules/NoScanningSourceFileProperty-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental-result.txt +++ b/Tests/RunCMake/CXXModules/NoScanningSourceFileProperty-result.txt diff --git a/Tests/RunCMake/CXXModules/NoScanningSourceFileProperty-stderr.txt b/Tests/RunCMake/CXXModules/NoScanningSourceFileProperty-stderr.txt new file mode 100644 index 0000000..464627c --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoScanningSourceFileProperty-stderr.txt @@ -0,0 +1,9 @@ +(CMake Error in CMakeLists.txt: +( The target named "noscanning-sf-property" has C\+\+ sources that use modules + but the compiler does not provide a way to discover the import graph + dependencies +| The target named "noscanning-sf-property" contains C\+\+ sources that use modules which + is not supported by the generator +) +)* +CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/NoScanningSourceFileProperty.cmake b/Tests/RunCMake/CXXModules/NoScanningSourceFileProperty.cmake new file mode 100644 index 0000000..f356a11 --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoScanningSourceFileProperty.cmake @@ -0,0 +1,13 @@ +enable_language(CXX) +unset(CMAKE_CXX_SCANDEP_SOURCE) + +add_executable(noscanning-sf-property + sources/module-use.cxx) +set_target_properties(noscanning-sf-property + PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_SCAN_FOR_MODULES 0) +set_source_files_properties(sources/module-use.cxx + PROPERTIES + CXX_SCAN_FOR_MODULES 1) diff --git a/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag-result.txt b/Tests/RunCMake/CXXModules/NoScanningTargetProperty-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag-result.txt +++ b/Tests/RunCMake/CXXModules/NoScanningTargetProperty-result.txt diff --git a/Tests/RunCMake/CXXModules/NoScanningTargetProperty-stderr.txt b/Tests/RunCMake/CXXModules/NoScanningTargetProperty-stderr.txt new file mode 100644 index 0000000..72c7a0a --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoScanningTargetProperty-stderr.txt @@ -0,0 +1,9 @@ +(CMake Error in CMakeLists.txt: +( The target named "noscanning-target-property" has C\+\+ sources that use + modules but the compiler does not provide a way to discover the import + graph dependencies +| The target named "noscanning-target-property" contains C\+\+ sources that use modules which + is not supported by the generator +) +)* +CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/NoScanningTargetProperty.cmake b/Tests/RunCMake/CXXModules/NoScanningTargetProperty.cmake new file mode 100644 index 0000000..97a3d44 --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoScanningTargetProperty.cmake @@ -0,0 +1,10 @@ +enable_language(CXX) +unset(CMAKE_CXX_SCANDEP_SOURCE) + +add_executable(noscanning-target-property + sources/module-use.cxx) +set_target_properties(noscanning-target-property + PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_SCAN_FOR_MODULES 1) diff --git a/Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt b/Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt index d73ff98..e5f0f0b 100644 --- a/Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt +++ b/Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt @@ -1,10 +1,3 @@ -CMake Warning \(dev\) at NotCXXSourceModules.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - CMake Error in CMakeLists.txt: Target "not-cxx-source" contains the source diff --git a/Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake b/Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake index c4e039f..f802cb7 100644 --- a/Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake +++ b/Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake @@ -1,6 +1,6 @@ enable_language(C) enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") add_library(not-cxx-source) target_sources(not-cxx-source diff --git a/Tests/RunCMake/CXXModules/NotCompiledSourceModules-stderr.txt b/Tests/RunCMake/CXXModules/NotCompiledSourceModules-stderr.txt index c963ce7..0af7b93 100644 --- a/Tests/RunCMake/CXXModules/NotCompiledSourceModules-stderr.txt +++ b/Tests/RunCMake/CXXModules/NotCompiledSourceModules-stderr.txt @@ -1,10 +1,3 @@ -CMake Warning \(dev\) at NotCompiledSourceModules.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - (CMake Error in CMakeLists.txt: Target "not-cxx-source" has source file diff --git a/Tests/RunCMake/CXXModules/NotCompiledSourceModules.cmake b/Tests/RunCMake/CXXModules/NotCompiledSourceModules.cmake index 0bab635..11d789d 100644 --- a/Tests/RunCMake/CXXModules/NotCompiledSourceModules.cmake +++ b/Tests/RunCMake/CXXModules/NotCompiledSourceModules.cmake @@ -1,5 +1,5 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") +set(CMAKE_CXX_SCANDEP_SOURCE "") add_library(not-cxx-source) target_sources(not-cxx-source diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake index f111b74..8b22687 100644 --- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake @@ -15,9 +15,10 @@ if ("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES) run_cmake(NoCXX20) endif () - # This test uses C++20, but another prerequisite is missing, so forced - # standards don't matter. - run_cmake(NoCXX20ModuleFlag) + run_cmake(NoScanningSourceFileProperty) + run_cmake(NoScanningTargetProperty) + run_cmake(CMP0155-OLD) + run_cmake(CMP0155-NEW) endif () if (RunCMake_GENERATOR MATCHES "Ninja") diff --git a/Tests/RunCMake/CXXModules/examples/circular-stderr.txt b/Tests/RunCMake/CXXModules/examples/circular-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/circular-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/circular/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/circular/CMakeLists.txt index 4d1997c..c1b000e 100644 --- a/Tests/RunCMake/CXXModules/examples/circular/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/circular/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_circular CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake b/Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake index 5f32364..1016afd 100644 --- a/Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake +++ b/Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake @@ -1,17 +1,5 @@ -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - -if (NOT EXISTS "${CMake_TEST_MODULE_COMPILATION_RULES}") - message(FATAL_ERROR - "The `CMake_TEST_MODULE_COMPILATION_RULES` file must be specified " - "for these tests to operate.") -endif () - -include("${CMake_TEST_MODULE_COMPILATION_RULES}") - -if (NOT CMake_TEST_CXXModules_UUID STREQUAL "a246741c-d067-4019-a8fb-3d16b0c9d1d3") - message(FATAL_ERROR - "The compilation rule file needs updated for changes in the test " - "suite. Please see the history for what needs to be updated.") +if (CMake_TEST_MODULE_COMPILATION_RULES) + include("${CMake_TEST_MODULE_COMPILATION_RULES}") endif () include(CTest) diff --git a/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt b/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/deep-chain/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/deep-chain/CMakeLists.txt index 78a1d0b..153a2df 100644 --- a/Tests/RunCMake/CXXModules/examples/deep-chain/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/deep-chain/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_deep_chain CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt b/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/duplicate/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/duplicate/CMakeLists.txt index 27be7a8..51ad167 100644 --- a/Tests/RunCMake/CXXModules/examples/duplicate/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/duplicate/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_duplicate CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/CMakeLists.txt index 71e7b62..cbe8fb7 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_bmi_and_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt index c17577c..0666ff1 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - find_package(export_bmi_and_interfaces REQUIRED) if (NOT TARGET CXXModules::export_bmi_and_interfaces) diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/CMakeLists.txt index e675507..c8679d6 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_bmi_and_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt index d608d67..36b0e8b 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - find_package(export_bmi_and_interfaces REQUIRED) if (NOT TARGET CXXModules::export_bmi_and_interfaces) diff --git a/Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-compile-commands/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-compile-commands/CMakeLists.txt index 2eb4d5f..b9c7bb3 100644 --- a/Tests/RunCMake/CXXModules/examples/export-compile-commands/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-compile-commands/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_compile_commands CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-build-stderr.txt deleted file mode 100644 index 28a7b1f..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-include-directories-build-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9] \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt index bc2ae7f..560994e 100644 --- a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_include_directories CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-install-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-include-directories-install-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt index 444882d..3d4e687 100644 --- a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_include_directories CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt index 9cdb7ff..12a533b 100644 --- a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt deleted file mode 100644 index 28a7b1f..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9] \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-build/CMakeLists.txt index 136e885..df471af 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt index 106bd1e..95fb6e8 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - find_package(export_interfaces REQUIRED) if (NOT TARGET CXXModules::export_interfaces) diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-install/CMakeLists.txt index df87980..019ae4a 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt index c19283b..725090e 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - find_package(export_interfaces REQUIRED) if (NOT TARGET CXXModules::export_interfaces) diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/CMakeLists.txt index a93e3a4..decadf7 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_interfaces_no_properties CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt index fba05f4..cd8d1df 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - find_package(export_interfaces_no_properties REQUIRED) if (NOT TARGET CXXModules::export_interfaces_no_properties) diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/CMakeLists.txt index 99e67e7..be32ecd 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt index fba05f4..cd8d1df 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - find_package(export_interfaces_no_properties REQUIRED) if (NOT TARGET CXXModules::export_interfaces_no_properties) diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-usage-build/CMakeLists.txt index 86a608b..a58e287 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_usage CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt index adec9e7..c84153d 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - find_package(export_usage REQUIRED) if (NOT TARGET CXXModules::export_usage) diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-usage-install/CMakeLists.txt index 11f53b0..3d7d67b 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_usage CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt index 9ccd63a..ceb428b 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - find_package(export_usage REQUIRED) if (NOT TARGET CXXModules::export_usage) diff --git a/Tests/RunCMake/CXXModules/examples/generated-stderr.txt b/Tests/RunCMake/CXXModules/examples/generated-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/generated-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt index 9a8da3d..efa825a 100644 --- a/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_generated CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt deleted file mode 100644 index e2970ec..0000000 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-build/export_bmi_and_interfaces-targets.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-build/export_bmi_and_interfaces-config.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(find_package\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt deleted file mode 100644 index ec5dd1f..0000000 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-install/lib/cmake/export_bmi_and_interfaces/export_bmi_and_interfaces-targets.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-install/lib/cmake/export_bmi_and_interfaces/export_bmi_and_interfaces-config.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(find_package\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-build-stderr.txt deleted file mode 100644 index 4ea3679..0000000 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-build-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-include-directories-build-build/export_include_directories-targets.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-include-directories-build-build/export_include_directories-config.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(find_package\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-install-stderr.txt deleted file mode 100644 index 50ad6b9..0000000 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-install-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-include-directories-install-install/lib/cmake/export_include_directories/export_include_directories-targets.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-include-directories-install-install/lib/cmake/export_include_directories/export_include_directories-config.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(find_package\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt deleted file mode 100644 index 10404c6..0000000 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-build-build/export_interfaces-targets.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-interface-build-build/export_interfaces-config.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(find_package\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt deleted file mode 100644 index 04124cd..0000000 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-install-install/lib/cmake/export_interfaces/export_interfaces-targets.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-interface-install-install/lib/cmake/export_interfaces/export_interfaces-config.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(find_package\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt deleted file mode 100644 index dcf6498..0000000 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-build/export_interfaces_no_properties-targets.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-build/export_interfaces_no_properties-config.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(find_package\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt deleted file mode 100644 index 7073b4a..0000000 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-install/lib/cmake/export_interfaces_no_properties/export_interfaces_no_properties-targets.cmake:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-install/lib/cmake/export_interfaces_no_properties/export_interfaces_no_properties-config.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(find_package\) -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt index 946792c..8e1db5d 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_import_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces/CMakeLists.txt index efaca0e..0beb672 100644 --- a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_install_bmi_and_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt b/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/install-bmi/CMakeLists.txt index 4e039f9..4047612 100644 --- a/Tests/RunCMake/CXXModules/examples/install-bmi/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/install-bmi/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_install_bmi CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt b/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/internal-partitions/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/internal-partitions/CMakeLists.txt index f5e9d94..bf99f7c 100644 --- a/Tests/RunCMake/CXXModules/examples/internal-partitions/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/internal-partitions/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_internal_partitions CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt b/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt b/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/library/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/library/CMakeLists.txt index 27fd94f..97d2325 100644 --- a/Tests/RunCMake/CXXModules/examples/library/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/library/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/object-library-stderr.txt b/Tests/RunCMake/CXXModules/examples/object-library-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/object-library-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/object-library/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/object-library/CMakeLists.txt index 238e30a..c858b3e 100644 --- a/Tests/RunCMake/CXXModules/examples/object-library/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/object-library/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_objlib CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt b/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/partitions/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/partitions/CMakeLists.txt index 3a7b0d4..07d32ae 100644 --- a/Tests/RunCMake/CXXModules/examples/partitions/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/partitions/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_partitions CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt b/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/public-req-private/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/public-req-private/CMakeLists.txt index 600fec4..f59f237 100644 --- a/Tests/RunCMake/CXXModules/examples/public-req-private/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/public-req-private/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_public_req_private CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt index 910c515..68da617 100644 --- a/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.26) +cmake_minimum_required(VERSION 3.26...3.28) project(req_private_other_target CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt b/Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/same-src-name/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/same-src-name/CMakeLists.txt index 997bbb1..8a47b0c 100644 --- a/Tests/RunCMake/CXXModules/examples/same-src-name/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/same-src-name/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.27) +cmake_minimum_required(VERSION 3.27...3.28) project(cxx_modules_same_src_name CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt b/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/scan_properties/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/scan_properties/CMakeLists.txt index f2f1c38..f5e5da6 100644 --- a/Tests/RunCMake/CXXModules/examples/scan_properties/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/scan_properties/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(scan_properties CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") @@ -11,9 +11,9 @@ endif () # To detect that not-to-be scanned sources are not scanned, add a `-D` to the # scan flags so that the files can detect whether scanning happened and error # if not. -string(APPEND CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG +string(APPEND CMAKE_CXX_MODULE_MAP_FLAG " -DCMAKE_SCANNED_THIS_SOURCE") -string(APPEND CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE +string(APPEND CMAKE_CXX_SCANDEP_SOURCE " -DCMAKE_SCANNED_THIS_SOURCE") set_property(SOURCE always_scan.cxx diff --git a/Tests/RunCMake/CXXModules/examples/simple-stderr.txt b/Tests/RunCMake/CXXModules/examples/simple-stderr.txt deleted file mode 100644 index be89b8c..0000000 --- a/Tests/RunCMake/CXXModules/examples/simple-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/simple/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/simple/CMakeLists.txt index 442e425..43f425a 100644 --- a/Tests/RunCMake/CXXModules/examples/simple/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/simple/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_simple CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt b/Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt deleted file mode 100644 index a121e86..0000000 --- a/Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(try_compile\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/try-compile/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/try-compile/CMakeLists.txt index dee61f1..66c32ba 100644 --- a/Tests/RunCMake/CXXModules/examples/try-compile/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/try-compile/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_try_compile CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/try-run-stderr.txt b/Tests/RunCMake/CXXModules/examples/try-run-stderr.txt deleted file mode 100644 index 8eea7a6..0000000 --- a/Tests/RunCMake/CXXModules/examples/try-run-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(try_run\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/try-run/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/try-run/CMakeLists.txt index fb03571..9480d74 100644 --- a/Tests/RunCMake/CXXModules/examples/try-run/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/try-run/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_try_run CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 611dde2..52be1bb 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -1125,3 +1125,5 @@ if(RunCMake_GENERATOR MATCHES "^Visual Studio 12 2013") run_cmake(DeprecateVS12-WARN-ON) run_cmake_with_options(DeprecateVS12-WARN-OFF -DCMAKE_WARN_VS12=OFF) endif() + +run_cmake_with_options(help-arbitrary "--help" "CMAKE_CXX_IGNORE_EXTENSIONS") diff --git a/Tests/RunCMake/CommandLine/help-arbitrary-stdout.txt b/Tests/RunCMake/CommandLine/help-arbitrary-stdout.txt new file mode 100644 index 0000000..3d07e91 --- /dev/null +++ b/Tests/RunCMake/CommandLine/help-arbitrary-stdout.txt @@ -0,0 +1,7 @@ +CMAKE_<LANG>_IGNORE_EXTENSIONS +------------------------------ + +File extensions that should be ignored by the build. + +This is a list of file extensions that may be part of a project for a +given language but are not compiled. diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json index 28f2b99..22dfabd 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json @@ -53,6 +53,40 @@ }, { "component": "Unspecified", + "type": "cxxModuleBmi", + "destination": "lib", + "paths": null, + "isExcludeFromAll": null, + "isForAllComponents": null, + "isOptional": null, + "targetId": null, + "targetIndex": null, + "cxxModuleBmiTarget": { + "id": "^cxx_exe::@a56b12a3f5c0529fb296", + "index": "cxx_exe" + }, + "targetIsImportLibrary": null, + "targetInstallNamelink": null, + "exportName": null, + "exportTargets": null, + "scriptFile": null, + "backtrace": [ + { + "file": "^cxx/CMakeLists\\.txt$", + "line": 38, + "command": "install", + "hasParent": true + }, + { + "file": "^cxx/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] + }, + { + "component": "Unspecified", "type": "runtimeDependencySet", "destination": "lib", "paths": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json index 44bc725..48c3a9d 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json @@ -49,6 +49,40 @@ }, { "component": "Unspecified", + "type": "cxxModuleBmi", + "destination": "bin", + "paths": null, + "isExcludeFromAll": null, + "isForAllComponents": null, + "isOptional": null, + "targetId": null, + "targetIndex": null, + "cxxModuleBmiTarget": { + "id": "^c_object_exe::@5ed5358f70faf8d8af7a$", + "index": "c_object_exe" + }, + "targetIsImportLibrary": null, + "targetInstallNamelink": null, + "exportName": null, + "exportTargets": null, + "scriptFile": null, + "backtrace": [ + { + "file": "^object/CMakeLists\\.txt$", + "line": 13, + "command": "install", + "hasParent": true + }, + { + "file": "^object/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] + }, + { + "component": "Unspecified", "type": "target", "destination": "bin", "paths": [ @@ -78,6 +112,40 @@ "hasParent": false } ] + }, + { + "component": "Unspecified", + "type": "cxxModuleBmi", + "destination": "bin", + "paths": null, + "isExcludeFromAll": null, + "isForAllComponents": null, + "isOptional": null, + "targetId": null, + "targetIndex": null, + "cxxModuleBmiTarget": { + "id": "^cxx_object_exe::@5ed5358f70faf8d8af7a$", + "index": "cxx_object_exe" + }, + "targetIsImportLibrary": null, + "targetInstallNamelink": null, + "exportName": null, + "exportTargets": null, + "scriptFile": null, + "backtrace": [ + { + "file": "^object/CMakeLists\\.txt$", + "line": 13, + "command": "install", + "hasParent": true + }, + { + "file": "^object/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] } ] } diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt index 7e91b76..c2187ae 100644 --- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt +++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt @@ -38,6 +38,7 @@ \* CMP0131 \* CMP0142 \* CMP0154 + \* CMP0155 Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_sources/FileSetDefaultWrongType-stderr.txt b/Tests/RunCMake/target_sources/FileSetDefaultWrongType-stderr.txt index faf0f5a..c13c8a8 100644 --- a/Tests/RunCMake/target_sources/FileSetDefaultWrongType-stderr.txt +++ b/Tests/RunCMake/target_sources/FileSetDefaultWrongType-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at FileSetDefaultWrongType\.cmake:[0-9]+ \(target_sources\): - target_sources File set TYPE may only be "HEADERS" + target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES" Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental-stderr.txt b/Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental-stderr.txt deleted file mode 100644 index 5356b07..0000000 --- a/Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental-stderr.txt +++ /dev/null @@ -1,11 +0,0 @@ -^CMake Warning \(dev\) at FileSetDefaultWrongTypeExperimental.cmake:6 \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Error at FileSetDefaultWrongTypeExperimental\.cmake:[0-9]+ \(target_sources\): - target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES" -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental.cmake b/Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental.cmake deleted file mode 100644 index 9a8429d..0000000 --- a/Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental.cmake +++ /dev/null @@ -1,6 +0,0 @@ -enable_language(C) - -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - -add_library(lib1 STATIC empty.c) -target_sources(lib1 PRIVATE FILE_SET UNKNOWN) diff --git a/Tests/RunCMake/target_sources/FileSetWrongType-stderr.txt b/Tests/RunCMake/target_sources/FileSetWrongType-stderr.txt index 8ffa786..9cc764f 100644 --- a/Tests/RunCMake/target_sources/FileSetWrongType-stderr.txt +++ b/Tests/RunCMake/target_sources/FileSetWrongType-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at FileSetWrongType\.cmake:[0-9]+ \(target_sources\): - target_sources File set TYPE may only be "HEADERS" + target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES" Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/target_sources/FileSetWrongTypeExperimental-stderr.txt b/Tests/RunCMake/target_sources/FileSetWrongTypeExperimental-stderr.txt deleted file mode 100644 index 5c75000..0000000 --- a/Tests/RunCMake/target_sources/FileSetWrongTypeExperimental-stderr.txt +++ /dev/null @@ -1,11 +0,0 @@ -^CMake Warning \(dev\) at FileSetWrongTypeExperimental.cmake:6 \(target_sources\): - CMake's C\+\+ module support is experimental. It is meant only for - experimentation and feedback to CMake developers. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Error at FileSetWrongTypeExperimental\.cmake:[0-9]+ \(target_sources\): - target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES" -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/target_sources/FileSetWrongTypeExperimental.cmake b/Tests/RunCMake/target_sources/FileSetWrongTypeExperimental.cmake deleted file mode 100644 index f63308c..0000000 --- a/Tests/RunCMake/target_sources/FileSetWrongTypeExperimental.cmake +++ /dev/null @@ -1,6 +0,0 @@ -enable_language(C) - -set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") - -add_library(lib1 STATIC empty.c) -target_sources(lib1 PRIVATE FILE_SET a TYPE UNKNOWN) diff --git a/Tests/RunCMake/target_sources/RunCMakeTest.cmake b/Tests/RunCMake/target_sources/RunCMakeTest.cmake index 8505f71..4d3d4fe 100644 --- a/Tests/RunCMake/target_sources/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_sources/RunCMakeTest.cmake @@ -27,8 +27,6 @@ run_cmake(FileSetProperties) run_cmake(FileSetNoType) run_cmake(FileSetWrongType) run_cmake(FileSetDefaultWrongType) -run_cmake(FileSetWrongTypeExperimental) -run_cmake(FileSetDefaultWrongTypeExperimental) run_cmake(FileSetChangeScope) run_cmake(FileSetChangeType) run_cmake(FileSetWrongBaseDirs) diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in index d4e4059..b8d8474 100644 --- a/Utilities/Sphinx/conf.py.in +++ b/Utilities/Sphinx/conf.py.in @@ -92,6 +92,7 @@ linkcheck_ignore = [r'about:|https://gitlab.kitware.com/cmake/community/-/wikis/ linkcheck_allowed_redirects = { r'https://cdash\.org': r'https://www\.cdash\.org/', + r'https://cmake.org/get-involved/': r'https://cmake.org/documentation/', r'https://docs\.nvidia\.com/cuda/': r'https://docs\.nvidia\.com/cuda/index\.html', r'https://learn\.microsoft\.com/en-us/cpp/c-language/parsing-c-command-line-arguments': r'https://learn\.microsoft\.com/en-us/cpp/c-language/parsing-c-command-line-arguments\?.*', r'https://openjdk\.java\.net/jeps/313': r'https://openjdk\.org:443/jeps/313', diff --git a/Utilities/cmlibuv/src/win/process.c b/Utilities/cmlibuv/src/win/process.c index 3b5b2800..14d7a69 100644 --- a/Utilities/cmlibuv/src/win/process.c +++ b/Utilities/cmlibuv/src/win/process.c @@ -102,6 +102,21 @@ static void uv__init_global_job_handle(void) { &info, sizeof info)) uv_fatal_error(GetLastError(), "SetInformationJobObject"); + + + if (!AssignProcessToJobObject(uv_global_job_handle_, GetCurrentProcess())) { + /* Make sure this handle is functional. The Windows kernel has a bug that + * if the first use of AssignProcessToJobObject is for a Windows Store + * program, subsequent attempts to use the handle with fail with + * INVALID_PARAMETER (87). This is possibly because all uses of the handle + * must be for the same Terminal Services session. We can ensure it is tied + * to our current session now by adding ourself to it. We could remove + * ourself afterwards, but there doesn't seem to be a reason to. + */ + DWORD err = GetLastError(); + if (err != ERROR_ACCESS_DENIED) + uv_fatal_error(err, "AssignProcessToJobObject"); + } } @@ -1101,6 +1116,7 @@ int uv_spawn(uv_loop_t* loop, * breakaway. */ process_flags |= DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP; + process_flags |= CREATE_SUSPENDED; } if (options->cpumask != NULL) { @@ -1159,20 +1175,8 @@ int uv_spawn(uv_loop_t* loop, TerminateProcess(info.hProcess, 1); goto done; } - - /* The process affinity of the child is set. Let it run. */ - if (ResumeThread(info.hThread) == ((DWORD)-1)) { - err = GetLastError(); - TerminateProcess(info.hProcess, 1); - goto done; - } } - /* Spawn succeeded. Beyond this point, failure is reported asynchronously. */ - - process->process_handle = info.hProcess; - process->pid = info.dwProcessId; - /* If the process isn't spawned as detached, assign to the global job object * so windows will kill it when the parent process dies. */ if (!(options->flags & UV_PROCESS_DETACHED)) { @@ -1195,6 +1199,19 @@ int uv_spawn(uv_loop_t* loop, } } + if (process_flags & CREATE_SUSPENDED) { + if (ResumeThread(info.hThread) == ((DWORD)-1)) { + err = GetLastError(); + TerminateProcess(info.hProcess, 1); + goto done; + } + } + + /* Spawn succeeded. Beyond this point, failure is reported asynchronously. */ + + process->process_handle = info.hProcess; + process->pid = info.dwProcessId; + /* Set IPC pid to all IPC pipes. */ for (i = 0; i < options->stdio_count; i++) { const uv_stdio_container_t* fdopt = &options->stdio[i]; |