diff options
author | Brad King <brad.king@kitware.com> | 2017-04-05 14:22:18 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-04-05 14:22:23 (GMT) |
commit | d9bd7adfdfa0e06ec77507933664f7ae344dcf1a (patch) | |
tree | 9f24d089d108f1424c5b5ae66a40403fe69a6798 /Source | |
parent | fe263c9882c820fbcf969b9be6e18087e91e4ae1 (diff) | |
parent | 01826231f8916057ad06555a3677c1806a2fb3be (diff) | |
download | CMake-d9bd7adfdfa0e06ec77507933664f7ae344dcf1a.zip CMake-d9bd7adfdfa0e06ec77507933664f7ae344dcf1a.tar.gz CMake-d9bd7adfdfa0e06ec77507933664f7ae344dcf1a.tar.bz2 |
Merge topic 'prop-is-multi-config'
01826231 Tests: Add case for GENERATOR_IS_MULTI_CONFIG
38fd5866 Add GENERATOR_IS_MULTI_CONFIG global property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !657
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmState.cxx | 14 | ||||
-rw-r--r-- | Source/cmState.h | 4 |
5 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 851290a..ce83e2e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -96,6 +96,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm) this->ConfigureDoneCMP0026AndCMP0024 = false; this->FirstTimeProgress = 0.0f; + cm->GetState()->SetIsGeneratorMultiConfig(false); cm->GetState()->SetMinGWMake(false); cm->GetState()->SetMSYSShell(false); cm->GetState()->SetNMake(false); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index eb92b83..6d16881 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -20,6 +20,7 @@ cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator(cmake* cm) : cmGlobalGenerator(cm) { + cm->GetState()->SetIsGeneratorMultiConfig(true); cm->GetState()->SetWindowsShell(true); cm->GetState()->SetWindowsVSIDE(true); } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 416af14..febe95d 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -151,6 +151,8 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm, this->CurrentMakefile = 0; this->CurrentLocalGenerator = 0; this->XcodeBuildCommandInitialized = false; + + cm->GetState()->SetIsGeneratorMultiConfig(true); } cmGlobalGeneratorFactory* cmGlobalXCodeGenerator::NewFactory() diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 18d5ea1..0f49731 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -20,6 +20,7 @@ cmState::cmState() : IsInTryCompile(false) + , IsGeneratorMultiConfig(false) , WindowsShell(false) , WindowsVSIDE(false) , WatcomWMake(false) @@ -364,6 +365,16 @@ void cmState::SetIsInTryCompile(bool b) this->IsInTryCompile = b; } +bool cmState::GetIsGeneratorMultiConfig() const +{ + return this->IsGeneratorMultiConfig; +} + +void cmState::SetIsGeneratorMultiConfig(bool b) +{ + this->IsGeneratorMultiConfig = b; +} + void cmState::RenameCommand(std::string const& oldName, std::string const& newName) { @@ -481,6 +492,9 @@ const char* cmState::GetGlobalProperty(const std::string& prop) } else if (prop == "IN_TRY_COMPILE") { this->SetGlobalProperty("IN_TRY_COMPILE", this->IsInTryCompile ? "1" : "0"); + } else if (prop == "GENERATOR_IS_MULTI_CONFIG") { + this->SetGlobalProperty("GENERATOR_IS_MULTI_CONFIG", + this->IsGeneratorMultiConfig ? "1" : "0"); } else if (prop == "ENABLED_LANGUAGES") { std::string langs; langs = cmJoin(this->EnabledLanguages, ";"); diff --git a/Source/cmState.h b/Source/cmState.h index 41ffcdc..5659023 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -116,6 +116,9 @@ public: bool GetIsInTryCompile() const; void SetIsInTryCompile(bool b); + bool GetIsGeneratorMultiConfig() const; + void SetIsGeneratorMultiConfig(bool b); + cmCommand* GetCommand(std::string const& name) const; void AddCommand(cmCommand* command); void RemoveUnscriptableCommands(); @@ -174,6 +177,7 @@ private: std::string SourceDirectory; std::string BinaryDirectory; bool IsInTryCompile; + bool IsGeneratorMultiConfig; bool WindowsShell; bool WindowsVSIDE; bool WatcomWMake; |