summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-11 15:56:42 (GMT)
committerDaniel Eiband <daniel.eiband@brainlab.com>2019-09-17 20:58:31 (GMT)
commit026ef9b312047778ac0638cf2d2ef8bed6a2b3f2 (patch)
treeba940a836a73de54e86dbb7452854fc5de6a8e33 /Source/cmNinjaTargetGenerator.cxx
parente6ddb57479a3620c712719c120a7337a84470d21 (diff)
downloadCMake-026ef9b312047778ac0638cf2d2ef8bed6a2b3f2.zip
CMake-026ef9b312047778ac0638cf2d2ef8bed6a2b3f2.tar.gz
CMake-026ef9b312047778ac0638cf2d2ef8bed6a2b3f2.tar.bz2
Refactoring: Use ConfigName instead of property CMAKE_BUILD_TYPE
Use memorized `this->ConfigName` instead of retrieving the value of property CMAKE_BUILD_TYPE.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 37e9e0e..84a98fd 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -777,11 +777,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements()
<< cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType())
<< " target " << this->GetTargetName() << "\n\n";
- const std::string& config =
- this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
{
std::vector<cmSourceFile const*> customCommands;
- this->GeneratorTarget->GetCustomCommands(customCommands, config);
+ this->GeneratorTarget->GetCustomCommands(customCommands, this->ConfigName);
for (cmSourceFile const* sf : customCommands) {
cmCustomCommand const* cc = sf->GetCustomCommand();
this->GetLocalGenerator()->AddCustomCommandTarget(
@@ -793,13 +791,13 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements()
}
{
std::vector<cmSourceFile const*> headerSources;
- this->GeneratorTarget->GetHeaderSources(headerSources, config);
+ this->GeneratorTarget->GetHeaderSources(headerSources, this->ConfigName);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
headerSources, this->MacOSXContentGenerator.get());
}
{
std::vector<cmSourceFile const*> extraSources;
- this->GeneratorTarget->GetExtraSources(extraSources, config);
+ this->GeneratorTarget->GetExtraSources(extraSources, this->ConfigName);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
extraSources, this->MacOSXContentGenerator.get());
}
@@ -808,7 +806,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements()
GetMakefile()->GetDefinition("CMAKE_PCH_EXTENSION");
std::vector<cmSourceFile const*> externalObjects;
- this->GeneratorTarget->GetExternalObjects(externalObjects, config);
+ this->GeneratorTarget->GetExternalObjects(externalObjects,
+ this->ConfigName);
for (cmSourceFile const* sf : externalObjects) {
const auto objectFileName = this->GetSourceFilePath(sf);
if (!cmSystemTools::StringEndsWith(objectFileName, pchExtension)) {
@@ -863,7 +862,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements()
{
std::vector<cmSourceFile const*> objectSources;
- this->GeneratorTarget->GetObjectSources(objectSources, config);
+ this->GeneratorTarget->GetObjectSources(objectSources, this->ConfigName);
for (cmSourceFile const* sf : objectSources) {
this->WriteObjectBuildStatement(sf);
}