summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-24 16:13:31 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-24 16:13:31 (GMT)
commit576f0b65c739bc719d493d66fc25c90404067943 (patch)
tree2761d2f453ff14102cff51bec8dd6e1b1a7aaaaf /Source/cmLocalGenerator.cxx
parentf437c8e888db7a934792371e74fd7c15b71ec34f (diff)
downloadCMake-576f0b65c739bc719d493d66fc25c90404067943.zip
CMake-576f0b65c739bc719d493d66fc25c90404067943.tar.gz
CMake-576f0b65c739bc719d493d66fc25c90404067943.tar.bz2
BUG: Fix generation of Xcode 2.0 and earlier projects to use CMAKE_BUILD_TYPE.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 24128ba..1f6a596 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1349,13 +1349,14 @@ cmLocalGenerator::ComputeLinkInformation(cmTarget& target,
//----------------------------------------------------------------------------
void cmLocalGenerator::AddLanguageFlags(std::string& flags,
- const char* lang)
+ const char* lang,
+ const char* config)
{
// Add language-specific flags.
std::string flagsVar = "CMAKE_";
flagsVar += lang;
flagsVar += "_FLAGS";
- this->AddConfigVariableFlags(flags, flagsVar.c_str());
+ this->AddConfigVariableFlags(flags, flagsVar.c_str(), config);
}
//----------------------------------------------------------------------------
@@ -1417,8 +1418,8 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName,
//----------------------------------------------------------------------------
void cmLocalGenerator::AddSharedFlags(std::string& flags,
- const char* lang,
- bool shared)
+ const char* lang,
+ bool shared)
{
std::string flagsVar;
@@ -1443,18 +1444,18 @@ void cmLocalGenerator::AddSharedFlags(std::string& flags,
//----------------------------------------------------------------------------
void cmLocalGenerator::AddConfigVariableFlags(std::string& flags,
- const char* var)
+ const char* var,
+ const char* config)
{
// Add the flags from the variable itself.
std::string flagsVar = var;
this->AppendFlags(flags, m_Makefile->GetDefinition(flagsVar.c_str()));
// Add the flags from the build-type specific variable.
- const char* buildType = m_Makefile->GetDefinition("CMAKE_BUILD_TYPE");
- if(buildType && *buildType)
+ if(config && *config)
{
flagsVar += "_";
- flagsVar += cmSystemTools::UpperCase(buildType);
+ flagsVar += cmSystemTools::UpperCase(config);
this->AppendFlags(flags, m_Makefile->GetDefinition(flagsVar.c_str()));
}
}