summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayde Reitsma <pootisspencerherenao@gmail.com>2021-09-03 23:34:05 (GMT)
committerWayde Reitsma <pootisspencerherenao@gmail.com>2021-09-03 23:34:05 (GMT)
commitfa2f6e0f5a4ae2349b3ccc309654b7f6cbadb080 (patch)
treece9d20de96e89c6ab887c54b1693d56507a31caf
parent256785749e152c4d587df4bd6805b87fe70572a7 (diff)
downloadCMake-fa2f6e0f5a4ae2349b3ccc309654b7f6cbadb080.zip
CMake-fa2f6e0f5a4ae2349b3ccc309654b7f6cbadb080.tar.gz
CMake-fa2f6e0f5a4ae2349b3ccc309654b7f6cbadb080.tar.bz2
cmNinjaTargetGenerator: Use short path for cmcldeps.exe
-rw-r--r--Source/cmNinjaTargetGenerator.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 1b6b834..be8bb08 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -774,8 +774,11 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
cmProp d = mf->GetDefinition("CMAKE_C_COMPILER");
const std::string cl =
d ? *d : mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
- cldeps = cmStrCat('"', cmSystemTools::GetCMClDepsCommand(), "\" ", lang,
- ' ', vars.Source, " $DEP_FILE $out \"",
+ std::string cmcldepsPath;
+ cmSystemTools::GetShortPath(cmSystemTools::GetCMClDepsCommand(),
+ cmcldepsPath);
+ cldeps = cmStrCat(cmcldepsPath, ' ', lang, ' ', vars.Source,
+ " $DEP_FILE $out \"",
mf->GetSafeDefinition("CMAKE_CL_SHOWINCLUDES_PREFIX"),
"\" \"", cl, "\" ");
}