Merge topic 'cxxmodules-remove-dyndep-variable'

0183e1bca3 cxxmodules: remove `CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP` variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8524
This commit is contained in:
Brad King
2023-06-02 13:39:22 +00:00
committed by Kitware Robot
48 changed files with 16 additions and 199 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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<std::string, StripCommandStyle> StripCommandStyleMap;
#endif
mutable bool DiagnosedCxxModuleSupport = false;
// Deferral id generation.
size_t NextDeferId = 0;

View File

@@ -874,7 +874,6 @@ bool cmGlobalNinjaGenerator::CheckLanguages(
bool cmGlobalNinjaGenerator::CheckCxxModuleSupport()
{
this->CxxModuleSupportCheck();
if (this->NinjaSupportsDyndepsCxx) {
return true;
}

View File

@@ -50,7 +50,6 @@ public:
bool CheckCxxModuleSupport() override
{
this->CxxModuleSupportCheck();
return this->SupportsCxxModuleDyndep();
}
bool SupportsCxxModuleDyndep() const override