summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 0db5687..b172478 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -229,6 +229,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool useResponseFile)
vars.SONameFlag = "$SONAME_FLAG";
vars.TargetSOName = "$SONAME";
vars.TargetPDB = "$TARGET_PDB";
+ vars.TargetCompilePDB = "$TARGET_COMPILE_PDB";
vars.Flags = "$FLAGS";
vars.LinkFlags = "$LINK_FLAGS";
@@ -602,10 +603,12 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
// First and very important step is to make sure while inside this
// step our link language is set to CUDA
std::string cudaLinkLanguage = "CUDA";
+ std::string const objExt =
+ this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_EXTENSION");
std::string const cfgName = this->GetConfigName();
- std::string const targetOutputReal =
- ConvertToNinjaPath(genTarget.ObjectDirectory + "cmake_device_link.o");
+ std::string const targetOutputReal = ConvertToNinjaPath(
+ genTarget.ObjectDirectory + "cmake_device_link" + objExt);
std::string const targetOutputImplib =
ConvertToNinjaPath(genTarget.GetFullPath(cfgName,
@@ -660,7 +663,6 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
this->addPoolNinjaVariable("JOB_POOL_LINK", &genTarget, vars);
- this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"]);
vars["LINK_FLAGS"] =
cmGlobalNinjaGenerator::EncodeLiteral(vars["LINK_FLAGS"]);
@@ -714,6 +716,8 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
this->ConvertToNinjaPath(objPath), cmOutputConverter::SHELL);
EnsureDirectoryExists(objPath);
+ this->SetMsvcTargetPdbVariable(vars);
+
if (this->GetGlobalGenerator()->IsGCCOnWindows()) {
// ar.exe can't handle backslashes in rsp files (implicitly used by gcc)
std::string& linkLibraries = vars["LINK_LIBRARIES"];