diff options
author | Peter Kümmel <syntheticpp@gmx.net> | 2012-10-03 15:19:47 (GMT) |
---|---|---|
committer | Peter Kümmel <syntheticpp@gmx.net> | 2012-10-03 15:24:36 (GMT) |
commit | 188c73cb749ae0b248df05baf9ea6227b54864da (patch) | |
tree | dfbf17a4a93cf2d3a2c55b3419cd634331813af7 /Source/cmNinjaTargetGenerator.cxx | |
parent | 17d4527032c4a7e626bbbdb0d4d88bd133c78977 (diff) | |
download | CMake-188c73cb749ae0b248df05baf9ea6227b54864da.zip CMake-188c73cb749ae0b248df05baf9ea6227b54864da.tar.gz CMake-188c73cb749ae0b248df05baf9ea6227b54864da.tar.bz2 |
Ninja: also set OBJECT_DIR when compiling
BUG: 0013510
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 612e047..811ac88 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -368,7 +368,7 @@ cmNinjaTargetGenerator std::string flags = "$FLAGS"; vars.Defines = "$DEFINES"; vars.TargetPDB = "$TARGET_PDB"; - + vars.ObjectDir = "$OBJECT_DIR"; cmMakefile* mf = this->GetMakefile(); @@ -566,6 +566,13 @@ cmNinjaTargetGenerator vars["DEP_FILE"] = objectFileName + ".d";; EnsureParentDirectoryExists(objectFileName); + std::string objectDir = cmSystemTools::GetFilenamePath(objectFileName); + objectDir = this->GetLocalGenerator()->Convert(objectDir.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + vars["OBJECT_DIR"] = objectDir; + + this->SetMsvcTargetPdbVariable(vars); if(this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS")) @@ -590,6 +597,7 @@ cmNinjaTargetGenerator compileObjectVars.Source = escapedSourceFileName.c_str(); compileObjectVars.Object = objectFileName.c_str(); + compileObjectVars.ObjectDir = objectDir.c_str(); compileObjectVars.Flags = vars["FLAGS"].c_str(); compileObjectVars.Defines = vars["DEFINES"].c_str(); |