summaryrefslogtreecommitdiff
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 0f1015208..3fb823cb0 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -147,7 +147,8 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source,
// Add shared-library flags if needed.
this->LocalGenerator->AddCMP0018Flags(flags, this->Target,
- language.c_str());
+ language.c_str(),
+ this->GetConfigName());
// Add include directory flags.
{
@@ -227,7 +228,7 @@ ComputeDefines(cmSourceFile *source, const std::string& language)
// Add preprocessor definitions for this target and configuration.
this->LocalGenerator->AppendDefines
(defines,
- this->GeneratorTarget->GetCompileDefinitions());
+ this->Target->GetCompileDefinitions(this->GetConfigName()));
this->LocalGenerator->AppendDefines
(defines,
source->GetProperty("COMPILE_DEFINITIONS"));
@@ -236,9 +237,6 @@ ComputeDefines(cmSourceFile *source, const std::string& language)
defPropName += cmSystemTools::UpperCase(this->GetConfigName());
this->LocalGenerator->AppendDefines
(defines,
- this->GeneratorTarget->GetCompileDefinitions(this->GetConfigName()));
- this->LocalGenerator->AppendDefines
- (defines,
source->GetProperty(defPropName.c_str()));
}
@@ -257,7 +255,7 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
return cmNinjaDeps();
cmComputeLinkInformation* cli =
- this->GeneratorTarget->GetLinkInformation(this->GetConfigName());
+ this->Target->GetLinkInformation(this->GetConfigName());
if(!cli)
return cmNinjaDeps();
@@ -423,17 +421,19 @@ cmNinjaTargetGenerator
std::vector<std::string> compileCmds;
cmSystemTools::ExpandListArgument(compileCmd, compileCmds);
+ if(useClDeps)
+ {
+ std::string cmdPrefix = clDepsBinary + lang + " $in \"$DEP_FILE\" $out " +
+ clShowPrefix + clBinary;
+ compileCmds.front().insert(0, cmdPrefix);
+ }
+
for (std::vector<std::string>::iterator i = compileCmds.begin();
i != compileCmds.end(); ++i)
this->GetLocalGenerator()->ExpandRuleVariables(*i, vars);
- std::string cmdLine;
- if(useClDeps)
- {
- cmdLine = clDepsBinary + lang + " $in \"$DEP_FILE\" $out " +
- clShowPrefix + clBinary;
- }
- cmdLine += this->GetLocalGenerator()->BuildCommandLine(compileCmds);
+ std::string cmdLine =
+ this->GetLocalGenerator()->BuildCommandLine(compileCmds);
// Write the rule for compiling file of the given language.
@@ -549,7 +549,7 @@ cmNinjaTargetGenerator
cmCustomCommand const* cc = (*si)->GetCustomCommand();
const std::vector<std::string>& ccoutputs = cc->GetOutputs();
std::transform(ccoutputs.begin(), ccoutputs.end(),
- std::back_inserter(implicitDeps), MapToNinjaPath());
+ std::back_inserter(orderOnlyDeps), MapToNinjaPath());
}
// If the source file is GENERATED and does not have a custom command