From 0183e1bca379199949210217869c3a214702eba1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 31 May 2023 12:10:43 -0400 Subject: cxxmodules: remove `CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP` variable It is now subsumed by the UUID setting completely. --- .gitlab/ci/cxx_modules_rules_clang.cmake | 2 -- .gitlab/ci/cxx_modules_rules_gcc.cmake | 1 - .gitlab/ci/cxx_modules_rules_msvc.cmake | 2 -- Help/dev/experimental.rst | 7 ------- Source/cmGeneratorTarget.cxx | 4 +++- Source/cmGlobalGenerator.cxx | 15 --------------- Source/cmGlobalGenerator.h | 4 ---- Source/cmGlobalNinjaGenerator.cxx | 1 - Source/cmGlobalVisualStudioVersionedGenerator.h | 1 - .../RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt | 7 +------ Tests/RunCMake/CXXModules/ExportBuildCxxModules.cmake | 1 - .../CXXModules/ExportInstallCxxModules-stderr.txt | 7 +------ Tests/RunCMake/CXXModules/ExportInstallCxxModules.cmake | 1 - .../RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt | 7 +------ Tests/RunCMake/CXXModules/FileSetModulesPrivate.cmake | 1 - Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt | 7 +------ Tests/RunCMake/CXXModules/FileSetModulesPublic.cmake | 1 - .../CXXModules/NinjaDependInfoBMIInstall-stderr.txt | 7 +------ Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall.cmake | 1 - .../RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt | 7 +------ Tests/RunCMake/CXXModules/NinjaDependInfoExport.cmake | 1 - .../RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt | 7 +------ Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake | 1 - Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake | 4 +++- Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt | 14 ++------------ Tests/RunCMake/CXXModules/NoDyndepSupport.cmake | 1 - Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt | 2 +- Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake | 1 - Tests/RunCMake/CXXModules/examples/circular-stderr.txt | 5 ----- Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt | 5 ----- Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt | 5 ----- .../examples/export-bmi-and-interface-build-stderr.txt | 5 ----- .../examples/export-bmi-and-interface-install-stderr.txt | 5 ----- .../CXXModules/examples/export-interface-build-stderr.txt | 5 ----- .../examples/export-interface-install-stderr.txt | 5 ----- .../export-interface-no-properties-build-stderr.txt | 5 ----- .../export-interface-no-properties-install-stderr.txt | 5 ----- Tests/RunCMake/CXXModules/examples/generated-stderr.txt | 5 ----- .../examples/install-bmi-and-interfaces-stderr.txt | 5 ----- Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt | 5 ----- .../CXXModules/examples/internal-partitions-stderr.txt | 5 ----- .../CXXModules/examples/library-shared-stderr.txt | 5 ----- .../CXXModules/examples/library-static-stderr.txt | 5 ----- Tests/RunCMake/CXXModules/examples/partitions-stderr.txt | 5 ----- .../CXXModules/examples/public-req-private-stderr.txt | 5 ----- .../examples/req-private-other-target-stderr.txt | 5 ----- .../CXXModules/examples/scan_properties-stderr.txt | 5 ----- Tests/RunCMake/CXXModules/examples/simple-stderr.txt | 5 ----- 48 files changed, 16 insertions(+), 199 deletions(-) diff --git a/.gitlab/ci/cxx_modules_rules_clang.cmake b/.gitlab/ci/cxx_modules_rules_clang.cmake index 8088330..a8e1ff6 100644 --- a/.gitlab/ci/cxx_modules_rules_clang.cmake +++ b/.gitlab/ci/cxx_modules_rules_clang.cmake @@ -1,7 +1,5 @@ set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) - # 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 index d800099..3777506 100644 --- a/.gitlab/ci/cxx_modules_rules_gcc.cmake +++ b/.gitlab/ci/cxx_modules_rules_gcc.cmake @@ -1,6 +1,5 @@ set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE " -E -x c++ " " -MT -MD -MF " diff --git a/.gitlab/ci/cxx_modules_rules_msvc.cmake b/.gitlab/ci/cxx_modules_rules_msvc.cmake index cb327fd..2b09b0e 100644 --- a/.gitlab/ci/cxx_modules_rules_msvc.cmake +++ b/.gitlab/ci/cxx_modules_rules_msvc.cmake @@ -1,3 +1 @@ set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") - -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) diff --git a/Help/dev/experimental.rst b/Help/dev/experimental.rst index beb4411..eac86ab 100644 --- a/Help/dev/experimental.rst +++ b/Help/dev/experimental.rst @@ -63,12 +63,6 @@ dependencies, set the following variables: ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` Set this to the UUID documented above. -``CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP`` - Set this to ``1`` in order to activate this undocumented experimental - infrastructure. This is **intended to make the functionality available - to compiler writers** so they can use it to develop and test their - dependency scanning tool. - Some compilers already have support for module dependency scanning: * MSVC 19.34 and newer (provided with Visual Studio 17.4 and newer) @@ -92,7 +86,6 @@ For example, add code like the following to a test project: .. code-block:: cmake - set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE " " " -MT -MD -MF " diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 5c2e238..3cefeda 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -28,6 +28,7 @@ #include "cmComputeLinkInformation.h" #include "cmCustomCommandGenerator.h" #include "cmEvaluatedTargetProperty.h" +#include "cmExperimental.h" #include "cmFileSet.h" #include "cmFileTimes.h" #include "cmGeneratedFileStream.h" @@ -8907,7 +8908,8 @@ cmGeneratorTarget::Cxx20SupportLevel cmGeneratorTarget::HaveCxxModuleSupport( // 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 (!this->Makefile->IsOn("CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP")) { + if (!cmExperimental::HasSupportEnabled( + *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi)) { return Cxx20SupportLevel::MissingExperimentalFlag; } return Cxx20SupportLevel::Supported; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 07c8f17..5175aae 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1465,19 +1465,6 @@ bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const return false; } -void cmGlobalGenerator::CxxModuleSupportCheck() const -{ - bool const diagnose = !this->DiagnosedCxxModuleSupport && - !this->CMakeInstance->GetIsInTryCompile(); - if (diagnose) { - this->DiagnosedCxxModuleSupport = true; - this->GetCMakeInstance()->IssueMessage( - MessageType::AUTHOR_WARNING, - "C++20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP " - "is experimental. It is meant only for compiler developers to try."); - } -} - void cmGlobalGenerator::ComputeBuildFileGenerators() { for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) { @@ -1641,8 +1628,6 @@ void cmGlobalGenerator::Generate() // it builds by default. this->InitializeProgressMarks(); - this->DiagnosedCxxModuleSupport = false; - this->ProcessEvaluationFiles(); this->CMakeInstance->UpdateProgress("Generating", 0.1f); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 01afabd..9aefaff 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -661,8 +661,6 @@ protected: virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const; - void CxxModuleSupportCheck() const; - bool AddHeaderSetVerification(); bool AddAutomaticSources(); @@ -775,8 +773,6 @@ private: std::map StripCommandStyleMap; #endif - mutable bool DiagnosedCxxModuleSupport = false; - // Deferral id generation. size_t NextDeferId = 0; diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 9380d7d..e20f157 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -874,7 +874,6 @@ bool cmGlobalNinjaGenerator::CheckLanguages( bool cmGlobalNinjaGenerator::CheckCxxModuleSupport() { - this->CxxModuleSupportCheck(); if (this->NinjaSupportsDyndepsCxx) { return true; } diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.h b/Source/cmGlobalVisualStudioVersionedGenerator.h index 558ea7c..8712459 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.h +++ b/Source/cmGlobalVisualStudioVersionedGenerator.h @@ -50,7 +50,6 @@ public: bool CheckCxxModuleSupport() override { - this->CxxModuleSupportCheck(); return this->SupportsCxxModuleDyndep(); } bool SupportsCxxModuleDyndep() const override diff --git a/Tests/RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt b/Tests/RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt index c05b0b4..a82791b 100644 --- a/Tests/RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt +++ b/Tests/RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt @@ -1,11 +1,6 @@ -CMake Warning \(dev\) at ExportBuildCxxModules.cmake:6 \(target_sources\): +CMake Warning \(dev\) at ExportBuildCxxModules.cmake:5 \(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:6 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -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 850f8dc..eb3a49c 100644 --- a/Tests/RunCMake/CXXModules/ExportBuildCxxModules.cmake +++ b/Tests/RunCMake/CXXModules/ExportBuildCxxModules.cmake @@ -1,5 +1,4 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") add_library(export-modules) diff --git a/Tests/RunCMake/CXXModules/ExportInstallCxxModules-stderr.txt b/Tests/RunCMake/CXXModules/ExportInstallCxxModules-stderr.txt index 4fe27a9..db02227 100644 --- a/Tests/RunCMake/CXXModules/ExportInstallCxxModules-stderr.txt +++ b/Tests/RunCMake/CXXModules/ExportInstallCxxModules-stderr.txt @@ -1,11 +1,6 @@ -CMake Warning \(dev\) at ExportInstallCxxModules.cmake:6 \(target_sources\): +CMake Warning \(dev\) at ExportInstallCxxModules.cmake:5 \(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:6 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -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 234a4b5..b4cb376 100644 --- a/Tests/RunCMake/CXXModules/ExportInstallCxxModules.cmake +++ b/Tests/RunCMake/CXXModules/ExportInstallCxxModules.cmake @@ -1,5 +1,4 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") add_library(export-modules) diff --git a/Tests/RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt b/Tests/RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt index 03e06cc..0c82ccc 100644 --- a/Tests/RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt +++ b/Tests/RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt @@ -1,11 +1,6 @@ -CMake Warning \(dev\) at FileSetModulesPrivate.cmake:6 \(target_sources\): +CMake Warning \(dev\) at FileSetModulesPrivate.cmake:5 \(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:6 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -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 ca18982..198ae15 100644 --- a/Tests/RunCMake/CXXModules/FileSetModulesPrivate.cmake +++ b/Tests/RunCMake/CXXModules/FileSetModulesPrivate.cmake @@ -1,5 +1,4 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") add_library(module) diff --git a/Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt b/Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt index 0c110c3..a27a28e 100644 --- a/Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt +++ b/Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt @@ -1,11 +1,6 @@ -CMake Warning \(dev\) at FileSetModulesPublic.cmake:6 \(target_sources\): +CMake Warning \(dev\) at FileSetModulesPublic.cmake:5 \(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:6 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -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 58de174..904e42e 100644 --- a/Tests/RunCMake/CXXModules/FileSetModulesPublic.cmake +++ b/Tests/RunCMake/CXXModules/FileSetModulesPublic.cmake @@ -1,5 +1,4 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") add_library(module) diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-stderr.txt b/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-stderr.txt index ebf7be5..9a7c1f9 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-stderr.txt +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-stderr.txt @@ -1,11 +1,6 @@ -CMake Warning \(dev\) at NinjaDependInfoBMIInstall.cmake:14 \(target_sources\): +CMake Warning \(dev\) at NinjaDependInfoBMIInstall.cmake:13 \(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:6 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -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 32dc42d..9f8e51a 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall.cmake +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall.cmake @@ -1,6 +1,5 @@ # Fake out that we have dyndep; we only need to generate, not actually build # here. -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") enable_language(CXX) diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt b/Tests/RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt index e328223..b66005b 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt @@ -1,11 +1,6 @@ -CMake Warning \(dev\) at NinjaDependInfoExport.cmake:14 \(target_sources\): +CMake Warning \(dev\) at NinjaDependInfoExport.cmake:13 \(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:6 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -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 05e7ef7..0b09d23 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoExport.cmake +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoExport.cmake @@ -1,6 +1,5 @@ # Fake out that we have dyndep; we only need to generate, not actually build # here. -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") enable_language(CXX) diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt index ca430cc..949b7af 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt @@ -1,11 +1,6 @@ -CMake Warning \(dev\) at NinjaDependInfoFileSet.cmake:14 \(target_sources\): +CMake Warning \(dev\) at NinjaDependInfoFileSet.cmake:13 \(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:6 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -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 74e729e..b50be99 100644 --- a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake @@ -1,6 +1,5 @@ # Fake out that we have dyndep; we only need to generate, not actually build # here. -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") enable_language(CXX) diff --git a/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake b/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake index 79892ee..f6ccb99 100644 --- a/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake +++ b/Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake @@ -1,6 +1,6 @@ enable_language(CXX) -unset(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP) +set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "echo") add_library(noexperimentalflag) target_sources(noexperimentalflag @@ -10,3 +10,5 @@ target_sources(noexperimentalflag 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 a0b2572..b63d291 100644 --- a/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt +++ b/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt @@ -1,16 +1,11 @@ -CMake Warning \(dev\) at NoDyndepSupport.cmake:10 \(target_sources\): +CMake Warning \(dev\) at NoDyndepSupport.cmake: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:6 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. -(CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. - -CMake Error: +(CMake Error: The Ninja generator does not support C\+\+20 modules using Ninja version .* @@ -22,11 +17,6 @@ CMake Error: by the generator ( -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. -)?( CMake Error in CMakeLists.txt: The "nodyndep" target contains C\+\+ module sources which are not supported by the generator diff --git a/Tests/RunCMake/CXXModules/NoDyndepSupport.cmake b/Tests/RunCMake/CXXModules/NoDyndepSupport.cmake index 0954400..71d0f26 100644 --- a/Tests/RunCMake/CXXModules/NoDyndepSupport.cmake +++ b/Tests/RunCMake/CXXModules/NoDyndepSupport.cmake @@ -1,5 +1,4 @@ enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") if (NOT CMAKE_CXX_STANDARD_DEFAULT) diff --git a/Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt b/Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt index d341c1f..78d3dc6 100644 --- a/Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt +++ b/Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at NotCXXSourceModules.cmake:7 \(target_sources\): +CMake Warning \(dev\) at NotCXXSourceModules.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\): diff --git a/Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake b/Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake index f7a6060..c4e039f 100644 --- a/Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake +++ b/Tests/RunCMake/CXXModules/NotCXXSourceModules.cmake @@ -1,6 +1,5 @@ enable_language(C) enable_language(CXX) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "") add_library(not-cxx-source) diff --git a/Tests/RunCMake/CXXModules/examples/circular-stderr.txt b/Tests/RunCMake/CXXModules/examples/circular-stderr.txt index 5e4392a..78bdf2b 100644 --- a/Tests/RunCMake/CXXModules/examples/circular-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/circular-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:7 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt b/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt index 5e4392a..78bdf2b 100644 --- a/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:7 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt b/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt index 5e4392a..78bdf2b 100644 --- a/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:7 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. 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 index c8dbdcf..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-stderr.txt @@ -2,8 +2,3 @@ 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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. 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 index c8dbdcf..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-stderr.txt @@ -2,8 +2,3 @@ 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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt index e318a34..28a7b1f 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt @@ -2,8 +2,3 @@ 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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt index c8dbdcf..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt @@ -2,8 +2,3 @@ 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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. 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 index c8dbdcf..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-stderr.txt @@ -2,8 +2,3 @@ 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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. 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 index c8dbdcf..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-stderr.txt @@ -2,8 +2,3 @@ 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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/generated-stderr.txt b/Tests/RunCMake/CXXModules/examples/generated-stderr.txt index b9bbf34..1dd9876 100644 --- a/Tests/RunCMake/CXXModules/examples/generated-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/generated-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:12 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt index 5e4392a..78bdf2b 100644 --- a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:7 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt b/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt index 5e4392a..78bdf2b 100644 --- a/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:7 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt b/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt index 4652aec..79c5637 100644 --- a/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:10 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt b/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt index 4652aec..79c5637 100644 --- a/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:10 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -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 index 4652aec..79c5637 100644 --- a/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:10 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt b/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt index 4652aec..79c5637 100644 --- a/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:10 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt b/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt index 5e4392a..78bdf2b 100644 --- a/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:7 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt index 5e4392a..78bdf2b 100644 --- a/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:7 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt b/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt index 2cb5957..34f3f85 100644 --- a/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:25 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/simple-stderr.txt b/Tests/RunCMake/CXXModules/examples/simple-stderr.txt index 5e4392a..78bdf2b 100644 --- a/Tests/RunCMake/CXXModules/examples/simple-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/simple-stderr.txt @@ -2,8 +2,3 @@ CMake Warning \(dev\) at CMakeLists.txt:7 \(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. - -CMake Warning \(dev\): - C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is - experimental. It is meant only for compiler developers to try. -This warning is for project developers. Use -Wno-dev to suppress it. -- cgit v0.12