mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
Merge topic 'prop-is-multi-config'
01826231Tests: Add case for GENERATOR_IS_MULTI_CONFIG38fd5866Add GENERATOR_IS_MULTI_CONFIG global property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !657
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator(cmake* cm)
|
||||
: cmGlobalGenerator(cm)
|
||||
{
|
||||
cm->GetState()->SetIsGeneratorMultiConfig(true);
|
||||
cm->GetState()->SetWindowsShell(true);
|
||||
cm->GetState()->SetWindowsVSIDE(true);
|
||||
}
|
||||
|
||||
@@ -151,6 +151,8 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm,
|
||||
this->CurrentMakefile = 0;
|
||||
this->CurrentLocalGenerator = 0;
|
||||
this->XcodeBuildCommandInitialized = false;
|
||||
|
||||
cm->GetState()->SetIsGeneratorMultiConfig(true);
|
||||
}
|
||||
|
||||
cmGlobalGeneratorFactory* cmGlobalXCodeGenerator::NewFactory()
|
||||
|
||||
@@ -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, ";");
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user