cmExperimental: gate build database support behind a flag

Given that the feature currently only supports C++ sources and is not
formally accepted by ISO yet, gate it behind a flag.
This commit is contained in:
Ben Boeckel
2024-08-07 14:15:50 -04:00
parent 23cbeb5035
commit e77655555c
13 changed files with 74 additions and 0 deletions
+4
View File
@@ -5942,6 +5942,10 @@ std::string cmGeneratorTarget::BuildDatabasePath(
if (!this->GetPropertyAsBool("EXPORT_BUILD_DATABASE")) {
return {};
}
if (!cmExperimental::HasSupportEnabled(
*this->Makefile, cmExperimental::Feature::ExportBuildDatabase)) {
return {};
}
// Check to see if the generator supports it.
if (!this->GetGlobalGenerator()->SupportsBuildDatabase()) {
return {};