summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-11-04 15:58:06 (GMT)
committerBrad King <brad.king@kitware.com>2021-11-04 16:23:35 (GMT)
commit16e24748c5092f19d53c80548083826f009aafc7 (patch)
tree2acc80df8a226c01bb9a4b059c70b72a396ceecc
parentfda948846b200336395c0e99be3fa2a0258d7f0a (diff)
downloadCMake-16e24748c5092f19d53c80548083826f009aafc7.zip
CMake-16e24748c5092f19d53c80548083826f009aafc7.tar.gz
CMake-16e24748c5092f19d53c80548083826f009aafc7.tar.bz2
Ninja Multi-Config: Fix cross-config custom command dependency tracing
Process `CMAKE_CROSS_CONFIGS` and friends to properly configure the generator for cross-config behavior before custom command dependency tracing.
-rw-r--r--Source/cmGlobalGenerator.cxx3
-rw-r--r--Source/cmGlobalGenerator.h2
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx3
-rw-r--r--Source/cmGlobalNinjaGenerator.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ac283ab..9914902 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1402,6 +1402,9 @@ bool cmGlobalGenerator::Compute()
this->SupportsDefaultConfigs())) {
return false;
}
+ if (!this->InspectConfigTypeVariables()) {
+ return false;
+ }
// Some generators track files replaced during the Generate.
// Start with an empty vector:
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index cc0ad29..96696aa 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -153,6 +153,8 @@ public:
*/
virtual void Configure();
+ virtual bool InspectConfigTypeVariables() { return true; }
+
bool Compute();
virtual void AddExtraIDETargets() {}
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 3f6f55e..7122b9f 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -568,9 +568,6 @@ void cmGlobalNinjaGenerator::Generate()
msg.str());
return;
}
- if (!this->InspectConfigTypeVariables()) {
- return;
- }
if (!this->OpenBuildFileStreams()) {
return;
}
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index ec73475..84fc06c 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -481,8 +481,6 @@ protected:
const std::set<std::string>& all, const std::set<std::string>& defaults,
const std::vector<std::string>& items);
- virtual bool InspectConfigTypeVariables() { return true; }
-
std::set<std::string> CrossConfigs;
std::set<std::string> DefaultConfigs;
std::string DefaultFileConfig;