summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-13 18:02:11 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-12 15:39:03 (GMT)
commit02582b91ad92969d8fbbd845a5d48b3fbd762966 (patch)
tree9dce94911a77826b9067a9538c0ac93fd4bffcf5 /Source/cmNinjaNormalTargetGenerator.cxx
parentd470cb70077acf2216afe097b5abe379f1828239 (diff)
downloadCMake-02582b91ad92969d8fbbd845a5d48b3fbd762966.zip
CMake-02582b91ad92969d8fbbd845a5d48b3fbd762966.tar.gz
CMake-02582b91ad92969d8fbbd845a5d48b3fbd762966.tar.bz2
CUDA: Populate compiler PDB placeholder during device linking
The device link step runs the host compiler internally so we need to use the proper compiler PDB file with MSVC.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 10ee70d..bc8d8ff 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";
@@ -716,6 +717,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"];