summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-09-21 20:03:08 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-10-02 14:17:31 (GMT)
commit0c07f390068fe5a9c3c99ebc64f6e6c72b6eff41 (patch)
tree89a4e61adfbb81b0194602a09f0052398d6100a0 /Source/cmGeneratorTarget.cxx
parent68caec9137f47fda219995db7cfdf588886c84a1 (diff)
downloadCMake-0c07f390068fe5a9c3c99ebc64f6e6c72b6eff41.zip
CMake-0c07f390068fe5a9c3c99ebc64f6e6c72b6eff41.tar.gz
CMake-0c07f390068fe5a9c3c99ebc64f6e6c72b6eff41.tar.bz2
cmExperimental: remove the flag for C++ modules
All the major compilers now have scheduled releases with support for scanning, so remove the experimental gate. Fixes: #18355
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 04d7bb1..bbb47e4 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"
@@ -9106,9 +9105,10 @@ 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 (!cmExperimental::HasSupportEnabled(
- *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi)) {
- return Cxx20SupportLevel::MissingExperimentalFlag;
+ cmValue scandepRule =
+ this->Target->GetMakefile()->GetDefinition("CMAKE_CXX_SCANDEP_SOURCE");
+ if (!scandepRule) {
+ return Cxx20SupportLevel::MissingRule;
}
return Cxx20SupportLevel::Supported;
}
@@ -9125,13 +9125,6 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
"\" 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 =
@@ -9149,6 +9142,7 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
"\"cxx_std_20\" (or newer) among its `target_compile_features`",
effStandard));
} break;
+ case cmGeneratorTarget::Cxx20SupportLevel::MissingRule:
case cmGeneratorTarget::Cxx20SupportLevel::Supported:
// All is well.
break;