diff options
author | Brad King <brad.king@kitware.com> | 2015-09-15 19:57:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-17 14:21:32 (GMT) |
commit | d488b5c9764805222d33d50cc070fd4f71aab262 (patch) | |
tree | a6ea9cc2b93a910ae813b4235c087cba4357dfec /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | 6d620f5ad7fc9767a7232659cde1d7c9abf78285 (diff) | |
download | CMake-d488b5c9764805222d33d50cc070fd4f71aab262.zip CMake-d488b5c9764805222d33d50cc070fd4f71aab262.tar.gz CMake-d488b5c9764805222d33d50cc070fd4f71aab262.tar.bz2 |
Ninja: Always add OBJECT_DIR variable to link rules
The <OBJECT_DIR> placeholder is always available in Makefile
generators so make it available from the Ninja generator too.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index b855bea..f62f8ad 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -579,11 +579,12 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["TARGET_PDB"] = base + suffix + dbg_suffix; } + const std::string objPath = GetTarget()->GetSupportDirectory(); + vars["OBJECT_DIR"] = ConvertToNinjaPath(objPath); + EnsureDirectoryExists(objPath); + if (this->GetGlobalGenerator()->IsGCCOnWindows()) { - const std::string objPath = GetTarget()->GetSupportDirectory(); - vars["OBJECT_DIR"] = ConvertToNinjaPath(objPath); - EnsureDirectoryExists(objPath); // ar.exe can't handle backslashes in rsp files (implicitly used by gcc) std::string& linkLibraries = vars["LINK_LIBRARIES"]; std::replace(linkLibraries.begin(), linkLibraries.end(), '\\', '/'); |