summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index cfcf9f4..e344df4 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -187,12 +187,7 @@ cmNinjaNormalTargetGenerator
responseFlag += rspfile;
// build response file content
- std::string linkOptionVar = cmakeVarLang;
- linkOptionVar += "_COMPILER_LINKER_OPTION_FLAG_";
- linkOptionVar += cmTarget::GetTargetTypeName(targetType);
- const std::string linkOption =
- GetMakefile()->GetSafeDefinition(linkOptionVar);
- rspcontent = "$in_newline "+linkOption+" $LINK_PATH $LINK_LIBRARIES";
+ rspcontent = "$in_newline $LINK_PATH $LINK_LIBRARIES";
vars.Objects = responseFlag.c_str();
vars.LinkLibraries = "";
}
@@ -608,6 +603,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
std::string(cmake::GetCMakeFilesDirectoryPostSlash())
+ target.GetName() + ".rsp";
+ // Gather order-only dependencies.
+ cmNinjaDeps orderOnlyDeps;
+ this->GetLocalGenerator()->AppendTargetDepends(this->GetTarget(),
+ orderOnlyDeps);
+
// Write the build statement for this target.
globalGen.WriteBuild(this->GetBuildFileStream(),
comment.str(),
@@ -615,7 +615,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
outputs,
explicitDeps,
implicitDeps,
- emptyDeps,
+ orderOnlyDeps,
vars,
rspfile,
commandLineLengthLimit);