diff --git a/Help/dev/experimental.rst b/Help/dev/experimental.rst index d4639e9e6d..a8e5973e4b 100644 --- a/Help/dev/experimental.rst +++ b/Help/dev/experimental.rst @@ -59,24 +59,6 @@ When activated, this experimental feature provides the following: .. _CPS: https://cps-org.github.io/cps/ .. |CPS| replace:: Common Package Specification -C++ ``import std`` support -========================== - -In order to activate support for ``import std`` in C++23 and newer targets, -set - -* variable ``CMAKE_EXPERIMENTAL_CXX_IMPORT_STD`` to -* value ``25d6f6aa-be65-4692-b44e-87b23e96d4e1``. - -This UUID may change in future versions of CMake. Be sure to use the value -documented here by the source tree of the version of CMake with which you are -experimenting. It must be set before the ``CXX`` toolchain is discovered by -CMake, usually as part of a ``project()`` call. - -When activated, this experimental feature provides the following: - -* Targets may use ``import std;`` in any scanned C++ source file. - Build database support ====================== diff --git a/Help/manual/cmake-cxxmodules.7.rst b/Help/manual/cmake-cxxmodules.7.rst index c086782917..dc0298621f 100644 --- a/Help/manual/cmake-cxxmodules.7.rst +++ b/Help/manual/cmake-cxxmodules.7.rst @@ -86,6 +86,8 @@ modules includes: ``import std`` Support ====================== +.. versionadded:: 4.5 + Support for ``import std`` is limited to the following toolchain and standard library combinations: @@ -108,12 +110,6 @@ for ``IMPORTED`` targets. ``import std`` is available for all language standards which support C++ module scanning (ie, C++20 and newer). -.. note:: - - This support is provided only when experimental support for - ``import std`` has been enabled by the - ``CMAKE_EXPERIMENTAL_CXX_IMPORT_STD`` gate. - Generator Support ================= @@ -506,9 +502,6 @@ The set of sources which need to be scanned may be modified using the :command:`target_sources`, :command:`target_compile_features`, and :command:`set_property` commands. -Additionally, targets may use the :prop_tgt:`CXX_MODULE_STD` target property -to indicate that ``import std`` is desired within the target's sources. - Generate ^^^^^^^^ diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 56f420c8b8..adf5c11aeb 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -233,7 +233,6 @@ Properties on Targets /prop_tgt/CXX_MODULE_SET /prop_tgt/CXX_MODULE_SET_NAME /prop_tgt/CXX_MODULE_SETS - /prop_tgt/CXX_MODULE_STD /prop_tgt/CXX_SCAN_FOR_MODULES /prop_tgt/CXX_STANDARD /prop_tgt/CXX_STANDARD_REQUIRED diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 1ba0cc9cc2..7f8af48be2 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -475,7 +475,6 @@ Variables that Control the Build /variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS /variable/CMAKE_CUDA_RUNTIME_LIBRARY /variable/CMAKE_CUDA_SEPARABLE_COMPILATION - /variable/CMAKE_CXX_MODULE_STD /variable/CMAKE_CXX_SCAN_FOR_MODULES /variable/CMAKE_DEBUG_POSTFIX /variable/CMAKE_DEBUGGER_WORKING_DIRECTORY @@ -644,7 +643,6 @@ Variables for Languages /variable/CMAKE_CUDA_STANDARD_REQUIRED /variable/CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES /variable/CMAKE_CXX_COMPILE_FEATURES - /variable/CMAKE_CXX_COMPILER_IMPORT_STD /variable/CMAKE_CXX_EXTENSIONS /variable/CMAKE_CXX_STANDARD /variable/CMAKE_CXX_STANDARD_REQUIRED diff --git a/Help/prop_tgt/CXX_MODULE_STD.rst b/Help/prop_tgt/CXX_MODULE_STD.rst deleted file mode 100644 index ed65b6d59f..0000000000 --- a/Help/prop_tgt/CXX_MODULE_STD.rst +++ /dev/null @@ -1,46 +0,0 @@ -CXX_MODULE_STD --------------- - -.. versionchanged:: 4.5 - - ``CXX_MODULE_STD`` no longer has any effect. ``import std;`` is handled - automatically on all sources with :prop_tgt:`CXX_SCAN_FOR_MODULES` enabled. - -.. versionadded:: 3.30 - -``CXX_MODULE_STD`` is a boolean specifying whether the target may use -``import std;`` its C++ sources or not. - -.. note:: - - This setting is meaningful only when experimental support for ``import - std;`` has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_IMPORT_STD`` gate. - -When this property is explicitly set to ``ON``, CMake will add a dependency to -a target which provides the C++ standard library's modules for the C++ -standard applied to the target. This target is only applicable within the -current build and will not appear in the exported interfaces of the targets. -When consumed, these targets will be reapplied as necessary. - -.. note:: - - Similar to the introduction of :prop_tgt:`CXX_SCAN_FOR_MODULES`, this - property defaults to **not** adding ``import std`` support to targets using - ``cxx_std_23`` without an explicit request in order to preserve existing - behavior for projects using C++23 without ``import std``. A future policy - to change the default behavior is expected once the feature sees wider - usage. - -This property's value is not relevant for targets which disable scanning (see -:prop_tgt:`CXX_SCAN_FOR_MODULES`). Additionally, this property only applies to -targets utilizing C++23 (``cxx_std_23``) or newer. - -The property supports -:manual:`generator expressions `, however -expressions that depend upon the configuration, the consuming target, or the -linker language are not allowed. Whether a target uses ``import std`` should -not depend upon such things as it is a static property of the target's source -code. - -Targets which are exported with C++ module sources will have this property's -resolved value exported. diff --git a/Help/release/dev/import-std.rst b/Help/release/dev/import-std.rst new file mode 100644 index 0000000000..66ba725f5f --- /dev/null +++ b/Help/release/dev/import-std.rst @@ -0,0 +1,10 @@ +import-std +---------- + +* The experimental gate for ``import std`` has been dropped. ``import std`` is + available for all C++20 and later code with :prop_tgt:`CXX_SCAN_FOR_MODULES` + enabled. + +* Variable :variable:`CMAKE_CXX_STDLIB_MODULES_JSON` sets a specific module + metadata file which CMake will use for constructing ``import std`` instead + of relying on automatic detection via the current C++ compiler. diff --git a/Help/variable/CMAKE_CXX_COMPILER_IMPORT_STD.rst b/Help/variable/CMAKE_CXX_COMPILER_IMPORT_STD.rst deleted file mode 100644 index a51e6f4d39..0000000000 --- a/Help/variable/CMAKE_CXX_COMPILER_IMPORT_STD.rst +++ /dev/null @@ -1,20 +0,0 @@ -CMAKE_CXX_COMPILER_IMPORT_STD ------------------------------ - -.. versionchanged:: 4.5 - - Reporting of supported C++ standard levels has been removed as toolchains - no longer control generation of standard library targets. - ``CMAKE_CXX_COMPILER_IMPORT_STD`` is left undefined. - -.. versionadded:: 3.30 - -A list of C++ standard levels for which ``import std`` support exists for the -current C++ toolchain. Support for C++\ may be detected using a -`` IN_LIST CMAKE_CXX_COMPILER_IMPORT_STD`` predicate with the -:command:`if` command. - -.. note:: - - This variable is meaningful only when experimental support for ``import - std;`` has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_IMPORT_STD`` gate. diff --git a/Help/variable/CMAKE_CXX_MODULE_STD.rst b/Help/variable/CMAKE_CXX_MODULE_STD.rst deleted file mode 100644 index 1f62881018..0000000000 --- a/Help/variable/CMAKE_CXX_MODULE_STD.rst +++ /dev/null @@ -1,20 +0,0 @@ -CMAKE_CXX_MODULE_STD --------------------- - -.. versionchanged:: 4.5 - - ``CMAKE_CXX_MODULE_STD`` no longer has any effect. ``import std;`` is handled - automatically on all sources with :prop_tgt:`CXX_SCAN_FOR_MODULES` enabled. - -.. versionadded:: 3.30 - -Whether to add utility targets as dependencies to targets with at least -``cxx_std_23`` or not. - -.. note:: - - This setting is meaningful only when experimental support for ``import - std;`` has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_IMPORT_STD`` gate. - -This variable is used to initialize the :prop_tgt:`CXX_MODULE_STD` property on -all targets. See that target property for additional information. diff --git a/Help/variable/CMAKE_CXX_STDLIB_MODULES_JSON.rst b/Help/variable/CMAKE_CXX_STDLIB_MODULES_JSON.rst index 134e8d60bc..52635585a4 100644 --- a/Help/variable/CMAKE_CXX_STDLIB_MODULES_JSON.rst +++ b/Help/variable/CMAKE_CXX_STDLIB_MODULES_JSON.rst @@ -1,7 +1,7 @@ CMAKE_CXX_STDLIB_MODULES_JSON ----------------------------- -.. versionadded:: 4.2 +.. versionadded:: 4.5 This variable may be used to set the path to a metadata file for CMake to understand how the ``import std`` target for the active CXX compiler should be diff --git a/Modules/Compiler/CMakeCommonCompilerMacros.cmake b/Modules/Compiler/CMakeCommonCompilerMacros.cmake index a97fe0fe54..2e0ce5d4f2 100644 --- a/Modules/Compiler/CMakeCommonCompilerMacros.cmake +++ b/Modules/Compiler/CMakeCommonCompilerMacros.cmake @@ -220,17 +220,6 @@ function(cmake_cxx_find_modules_json) return () endif () - # Check the experimental flag. Check it here to avoid triggering warnings in - # situations that don't support the feature anyways. - set(_cmake_supported_import_std_experimental "") - cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED - "CxxImportStd" - _cmake_supported_import_std_experimental) - if (NOT _cmake_supported_import_std_experimental) - set(CMAKE_CXX_COMPILER_IMPORT_STD_ERROR_MESSAGE "Experimental `import std` support not enabled when detecting toolchain; it must be set before `CXX` is enabled (usually a `project()` call)" PARENT_SCOPE) - return () - endif () - _cmake_cxx_find_modules_json() set(CMAKE_CXX_COMPILER_IMPORT_STD_ERROR_MESSAGE "${CMAKE_CXX_COMPILER_IMPORT_STD_ERROR_MESSAGE}" PARENT_SCOPE) set(CMAKE_CXX_STDLIB_MODULES_JSON "${CMAKE_CXX_STDLIB_MODULES_JSON}" PARENT_SCOPE) diff --git a/Source/cmExperimental.cxx b/Source/cmExperimental.cxx index ada458e527..a1b8b81fed 100644 --- a/Source/cmExperimental.cxx +++ b/Source/cmExperimental.cxx @@ -29,14 +29,6 @@ cmExperimental::FeatureData const LookupTable[] = { "only for experimentation and feedback to CMake developers.", {}, cmExperimental::TryCompileCondition::Always }, - // CxxImportStd - { "CxxImportStd", - "25d6f6aa-be65-4692-b44e-87b23e96d4e1", - "CMAKE_EXPERIMENTAL_CXX_IMPORT_STD", - "CMake's support for `import std;` in C++23 and newer is experimental. It " - "is meant only for experimentation and feedback to CMake developers.", - {}, - cmExperimental::TryCompileCondition::Always }, // MappedPackageInfo { "MappedPackageInfo", "ababa1b5-7099-495f-a9cd-e22d38f274f2", diff --git a/Source/cmExperimental.h b/Source/cmExperimental.h index dcd99ebf99..79dbd5fdf2 100644 --- a/Source/cmExperimental.h +++ b/Source/cmExperimental.h @@ -18,7 +18,6 @@ public: enum class Feature { ExportPackageDependencies, - CxxImportStd, MappedPackageInfo, ExportBuildDatabase, GenerateSbom, diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index bdc7a273a7..c457419699 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5446,11 +5446,6 @@ bool CreateCxxStdlibTarget(cmMakefile* makefile, cmLocalGenerator* lg, bool cmGeneratorTarget::ApplyCXXStdTarget() { - if (!cmExperimental::HasSupportEnabled( - *this->Makefile, cmExperimental::Feature::CxxImportStd)) { - return true; - } - std::vector const& configs = this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig); diff --git a/Tests/RunCMake/CXXModulesCompile/build-database-check.cmake b/Tests/RunCMake/CXXModulesCompile/build-database-check.cmake index c1cf629c35..694c65d188 100644 --- a/Tests/RunCMake/CXXModulesCompile/build-database-check.cmake +++ b/Tests/RunCMake/CXXModulesCompile/build-database-check.cmake @@ -1,5 +1,57 @@ include("${CMAKE_CURRENT_LIST_DIR}/check-json.cmake") +# The `import std` support targets are generated by CMake and their build +# database contents vary by toolchain (flags, depfile paths, module names, +# translation unit ordering, etc.). Ignore everything related to them so +# that the same expectations can be shared across platforms. +function (filter_import_std_sets json_in json_out) + set(json "${json_in}") + + # Drop `@cmake_cxx_std@` sets. + string(JSON sets_len LENGTH "${json}" "sets") + if (sets_len GREATER 0) + math(EXPR last "${sets_len} - 1") + set(std_indices "") + foreach (idx RANGE "${last}") + string(JSON name GET "${json}" "sets" "${idx}" "name") + if (name MATCHES "^@cmake_cxx_std@") + list(APPEND std_indices "${idx}") + endif () + endforeach () + list(REVERSE std_indices) + foreach (idx IN LISTS std_indices) + string(JSON json REMOVE "${json}" "sets" "${idx}") + endforeach () + endif () + + # Drop references to those sets from every `visible-sets` array. + string(JSON sets_len LENGTH "${json}" "sets") + if (sets_len GREATER 0) + math(EXPR last "${sets_len} - 1") + foreach (idx RANGE "${last}") + string(JSON vis_len LENGTH "${json}" "sets" "${idx}" "visible-sets") + if (vis_len GREATER 0) + math(EXPR vis_last "${vis_len} - 1") + set(vis_indices "") + foreach (vis_idx RANGE "${vis_last}") + string(JSON vis_name GET + "${json}" "sets" "${idx}" "visible-sets" "${vis_idx}") + if (vis_name MATCHES "^@cmake_cxx_std@") + list(APPEND vis_indices "${vis_idx}") + endif () + endforeach () + list(REVERSE vis_indices) + foreach (vis_idx IN LISTS vis_indices) + string(JSON json REMOVE + "${json}" "sets" "${idx}" "visible-sets" "${vis_idx}") + endforeach () + endif () + endforeach () + endif () + + set("${json_out}" "${json}" PARENT_SCOPE) +endfunction () + function (check_build_database expect_basename fname component) if (component STREQUAL "NO_EXIST") if (EXISTS "${RunCMake_TEST_BINARY_DIR}/${fname}") @@ -70,6 +122,8 @@ function (check_build_database expect_basename fname component) file(READ "${RunCMake_TEST_BINARY_DIR}/${fname}" actual) file(READ "${expected_file}" expect) + filter_import_std_sets("${actual}" actual) + set(RunCMake_TEST_FAILED_before "${RunCMake_TEST_FAILED}") set(RunCMake_TEST_FAILED "") diff --git a/Tests/RunCMake/CXXModulesCompile/imp-dummy-std-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-dummy-std-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-dummy-std-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-dummy-std/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-dummy-std/CMakeLists.txt index 8463849503..a4e5d3e7d1 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-dummy-std/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-dummy-std/CMakeLists.txt @@ -1,5 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") set(CMAKE_CXX_STDLIB_MODULES_JSON "${CMAKE_CURRENT_LIST_DIR}/../dummy-std/manifest/dummy-std.modules.json" ) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build/CMakeLists.txt index 949c08414e..2ee81d0949 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_import_std_export_no_std CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-install-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-install-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-install-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-install/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-install/CMakeLists.txt index 1f6deeeed9..b431d32de2 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-install/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_import_std_export_no_std CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-no-std-json-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-no-std-json-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-no-std-json-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-no-std-json/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-no-std-json/CMakeLists.txt index 367f611e48..d4b0bb0bd9 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-no-std-json/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-no-std-json/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_import_std_no_json CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build/CMakeLists.txt index 7d22c80069..5f3ab6da13 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_import_std_not_in_export CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-install-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-install-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-install-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-install/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-install/CMakeLists.txt index ed3b1360b2..9fa2e535d7 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-install/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_import_std_not_in_export CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-shared-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-shared-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-shared-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-shared/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-shared/CMakeLists.txt index 9e7c9f23d1..137ac2968a 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-shared/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-shared/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_import_std_shared CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-shared/test/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-shared/test/CMakeLists.txt index b3cf24c78e..df81f07f1f 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-shared/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-shared/test/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_library CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-trans-exp-no-std-build-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-trans-exp-no-std-build-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-trans-exp-no-std-build-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-trans-exp-no-std-install-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-trans-exp-no-std-install-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-trans-exp-no-std-install-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-trans-not-in-exp-build-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-trans-not-in-exp-build-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-trans-not-in-exp-build-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-trans-not-in-exp-install-stderr.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-trans-not-in-exp-install-stderr.txt deleted file mode 100644 index 5b4728eb73..0000000000 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-trans-not-in-exp-install-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Warning \(experimental\) at .*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - .*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - .*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-trans/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-trans/CMakeLists.txt index e91debb6cc..1b1b06edd8 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-trans/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-trans/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_import_std_transitive CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std/CMakeLists.txt index 0f420b94d4..33dcef857f 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(cxx_modules_import_std CXX) diff --git a/Tests/RunCMake/CXXModulesCompile/mixed-bmi-compatibility-build-check.cmake b/Tests/RunCMake/CXXModulesCompile/mixed-bmi-compatibility-build-check.cmake index 8728c7a2cc..209bb65b24 100644 --- a/Tests/RunCMake/CXXModulesCompile/mixed-bmi-compatibility-build-check.cmake +++ b/Tests/RunCMake/CXXModulesCompile/mixed-bmi-compatibility-build-check.cmake @@ -28,17 +28,17 @@ foreach (consumer IN LISTS expected_consumers) file(READ "${depend_info_file}" depend_info_json) - # Extract linked-target-dirs array length and first element + # Extract linked-target-dirs. string(JSON linked_dirs_len LENGTH "${depend_info_json}" "linked-target-dirs") string(JSON linked_dirs GET "${depend_info_json}" "linked-target-dirs") if (consumer STREQUAL "consumer20") - set(expected_linked_tgt_regex "^importable\.dir$") + set(expected_linked_tgt_regex "^importable\\.dir$") set(expected_linked_tgt_desc "owning target dir for 'importable'") set(expected_linked_tgt_has_bmi 0) elseif (consumer STREQUAL "consumer23" OR consumer STREQUAL "consumer23flag") - set(expected_linked_tgt_regex "^importable@synth_[A-Za-z0-9_]+\.dir$") + set(expected_linked_tgt_regex "^importable@synth_[A-Za-z0-9_]+\\.dir$") set(expected_linked_tgt_desc "shared synthetic target dir for 'importable'") set(expected_linked_tgt_has_bmi 1) else () @@ -53,35 +53,40 @@ foreach (consumer IN LISTS expected_consumers) continue() endif () - # For this test, expect exactly one linked target dir per consumer - if (NOT linked_dirs_len EQUAL 1) + set(importable_dirs "") + set(linked_dir "") + set(linked_tgt_name "") + foreach (idx RANGE "${linked_dirs_len}") + if (idx EQUAL linked_dirs_len) + break () + endif () + string(JSON candidate GET "${depend_info_json}" "linked-target-dirs" "${idx}") + if (RunCMake_GENERATOR_IS_MULTI_CONFIG) + cmake_path(GET candidate PARENT_PATH candidate_root) + else () + set(candidate_root "${candidate}") + endif () + cmake_path(GET candidate_root FILENAME candidate_name) + if (candidate_name MATCHES "^importable(@synth_[A-Za-z0-9_]+)?\\.dir$") + list(APPEND importable_dirs "${candidate}") + set(linked_dir "${candidate}") + set(linked_tgt_name "${candidate_name}") + endif () + endforeach () + + list(LENGTH importable_dirs importable_dirs_len) + if (NOT importable_dirs_len EQUAL 1) list(APPEND RunCMake_TEST_FAILED - "Expected 1 linked-target-dir for '${consumer}' but found ${linked_dirs_len}: ${linked_dirs}") - continue() + "Expected exactly one 'importable' linked-target-dir for '${consumer}' but found ${importable_dirs_len}: ${linked_dirs}") + continue () endif () - string(JSON linked_dir GET "${depend_info_json}" "linked-target-dirs" 0) - - if (RunCMake_GENERATOR_IS_MULTI_CONFIG) - cmake_path(GET linked_dir PARENT_PATH linked_tgt_root) - else () - set(linked_tgt_root "${linked_dir}") - endif () - - cmake_path(GET linked_tgt_root FILENAME linked_tgt_name) - if (NOT linked_tgt_name MATCHES "${expected_linked_tgt_regex}") list(APPEND RunCMake_TEST_FAILED "Consumer '${consumer}' should link to ${expected_linked_tgt_desc} but found ${linked_dir}") continue() endif () - if (RunCMake_GENERATOR_IS_MULTI_CONFIG) - set(linked_output_dir "${linked_dir}/${config_dir}") - else () - set(linked_output_dir "${linked_dir}") - endif () - # Verify the linked target dir exists and contains a BMI if (NOT EXISTS "${linked_dir}") list(APPEND RunCMake_TEST_FAILED diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-import-std-stderr.txt b/Tests/RunCMake/FileAPI/codemodel-v2-import-std-stderr.txt deleted file mode 100644 index 86267b3b26..0000000000 --- a/Tests/RunCMake/FileAPI/codemodel-v2-import-std-stderr.txt +++ /dev/null @@ -1,12 +0,0 @@ -CMake Warning \(experimental\) at [^ -]*/Modules/Compiler/CMakeCommonCompilerMacros\.cmake:[0-9]* \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer is experimental\. It - is meant only for experimentation and feedback to CMake developers\. -Call Stack \(most recent call first\): - [^ -]*/Modules/CMakeDetermineCompilerSupport\.cmake:[0-9]* \(cmake_cxx_find_modules_json\) - [^ -]*/Modules/CMakeTestCXXCompiler\.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) - CMakeLists\.txt:[0-9]* \(project\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-import-std/CMakeLists.txt b/Tests/RunCMake/FileAPI/codemodel-v2-import-std/CMakeLists.txt index 928b1dea40..f636b96bdf 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-import-std/CMakeLists.txt +++ b/Tests/RunCMake/FileAPI/codemodel-v2-import-std/CMakeLists.txt @@ -1,6 +1,3 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - cmake_minimum_required(VERSION 3.29) project(codemodel_v2_import_std CXX) diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-quiet.cmake b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-quiet.cmake deleted file mode 100644 index 3536bcf7d1..0000000000 --- a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-quiet.cmake +++ /dev/null @@ -1,25 +0,0 @@ -cmake_diagnostic(SET CMD_EXPERIMENTAL IGNORE) - -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "01234567-0123-0123-0123-0123456789ab") - -cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED - "CxxImportStd" - feature_present) - -if (NOT feature_present STREQUAL "FALSE") - message(FATAL_ERROR - "Expected the `CxxImportStd` feature to be disabled.") -endif () - -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - -cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED - "CxxImportStd" - feature_present) - -if (NOT feature_present STREQUAL "TRUE") - message(FATAL_ERROR - "Expected the `CxxImportStd` feature to be enabled.") -endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set-stderr.txt b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set-stderr.txt deleted file mode 100644 index 499bac245c..0000000000 --- a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -^CMake Warning \(experimental\) at Experimental/CxxImportStd-set\.cmake:4 \(cmake_language\): - CMake's support for `import std;` in C\+\+23 and newer 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-author or -Wno-experimental -to suppress it\.$ diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set.cmake b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set.cmake deleted file mode 100644 index f456ad3ded..0000000000 --- a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set.cmake +++ /dev/null @@ -1,11 +0,0 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "25d6f6aa-be65-4692-b44e-87b23e96d4e1") - -cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED - "CxxImportStd" - feature_present) - -if (NOT feature_present STREQUAL "TRUE") - message(FATAL_ERROR - "Expected the `CxxImportStd` feature to be enabled.") -endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-unset.cmake b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-unset.cmake deleted file mode 100644 index be758c239f..0000000000 --- a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-unset.cmake +++ /dev/null @@ -1,8 +0,0 @@ -cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED - "CxxImportStd" - feature_present) - -if (NOT feature_present STREQUAL "FALSE") - message(FATAL_ERROR - "Expected the `CxxImportStd` feature to be disabled.") -endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-wrong-stderr.txt b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-wrong-stderr.txt deleted file mode 100644 index ec68e0982b..0000000000 --- a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-wrong-stderr.txt +++ /dev/null @@ -1,27 +0,0 @@ -^CMake Warning \(experimental\) at Experimental/CxxImportStd-wrong\.cmake:4 \(cmake_language\): - CMAKE_EXPERIMENTAL_CXX_IMPORT_STD is set to incorrect value - - 01234567-0123-0123-0123-0123456789ab - - See 'Help/dev/experimental\.rst' in the source tree of this version of CMake - for documentation of the experimental feature and the corresponding - activation value\. This project's code may require changes to work with - this CMake's version of the feature\. -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\. -+ -CMake Warning \(experimental\) at Experimental/CxxImportStd-wrong\.cmake:19 \(cmake_language\): - CMAKE_EXPERIMENTAL_CXX_IMPORT_STD is set to incorrect value - - 76543210-3210-3210-3210-ba9876543210 - - See 'Help/dev/experimental\.rst' in the source tree of this version of CMake - for documentation of the experimental feature and the corresponding - activation value\. This project's code may require changes to work with - this CMake's version of the feature\. -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) -This warning is for project developers\. Use -Wno-author or -Wno-experimental -to suppress it\.$ diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-wrong.cmake b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-wrong.cmake deleted file mode 100644 index 751d4fe302..0000000000 --- a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-wrong.cmake +++ /dev/null @@ -1,21 +0,0 @@ -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "01234567-0123-0123-0123-0123456789ab") - -cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED - "CxxImportStd" - feature_present) - -if (NOT feature_present STREQUAL "FALSE") - message(FATAL_ERROR - "Expected the `CxxImportStd` feature to be disabled.") -endif () - -# Test if/when warning is repeated. -cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED - "CxxImportStd" - feature_present) -set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD - "76543210-3210-3210-3210-ba9876543210") -cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED - "CxxImportStd" - feature_present) diff --git a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake index 46077d9aff..cb7df4bcbc 100644 --- a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake @@ -158,10 +158,6 @@ run_cmake_command( -P ${RunCMake_SOURCE_DIR}/get_message_log_level.cmake ) -run_cmake(Experimental/CxxImportStd-set) -run_cmake(Experimental/CxxImportStd-unset) -run_cmake(Experimental/CxxImportStd-wrong) -run_cmake(Experimental/CxxImportStd-quiet) run_cmake(Experimental/ExportPackageDependencies-set) run_cmake(Experimental/ExportPackageDependencies-unset) run_cmake(Experimental/ExportPackageDependencies-wrong)