diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-23 20:21:59 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-23 22:31:31 (GMT) |
commit | 5e026739e10f4cf5241f27fb9ba6721edb854018 (patch) | |
tree | 9d7ef765c1ad70d2957d159962bba3b23de835bf /Source/cmGlobalNinjaGenerator.cxx | |
parent | 9b9a42166803e864a8b08c22cadfe8db447acb40 (diff) | |
download | CMake-5e026739e10f4cf5241f27fb9ba6721edb854018.zip CMake-5e026739e10f4cf5241f27fb9ba6721edb854018.tar.gz CMake-5e026739e10f4cf5241f27fb9ba6721edb854018.tar.bz2 |
cmGlobalGenerator: factor out C++ module support checking
This will simplify adding support to other generators.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index e334666..618dfb7 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -591,7 +591,7 @@ void cmGlobalNinjaGenerator::Generate() this->TargetAll = this->NinjaOutputPath("all"); this->CMakeCacheFile = this->NinjaOutputPath("CMakeCache.txt"); this->DisableCleandead = false; - this->DiagnosedCxxModuleSupport = false; + this->DiagnosedCxxModuleNinjaSupport = false; this->PolicyCMP0058 = this->LocalGenerators[0]->GetMakefile()->GetPolicyStatus( @@ -850,18 +850,12 @@ bool cmGlobalNinjaGenerator::CheckLanguages( bool cmGlobalNinjaGenerator::CheckCxxModuleSupport() { - 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."); - } + this->CxxModuleSupportCheck(); if (this->NinjaSupportsDyndeps) { return true; } + bool const diagnose = !this->DiagnosedCxxModuleNinjaSupport && + !this->CMakeInstance->GetIsInTryCompile(); if (diagnose) { std::ostringstream e; /* clang-format off */ |