summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx12
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx12
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
4 files changed, 12 insertions, 16 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 69fe444..69b8092 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -338,13 +338,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
vars.CMTarget = this->Target;
vars.Language = linkLanguage;
vars.Objects = buildObjs.c_str();
- std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
- objdir += this->Target->GetName();
- objdir += ".dir";
- objdir = this->Convert(objdir.c_str(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::SHELL);
- vars.ObjectDir = objdir.c_str();
+ std::string objectDir = this->Target->GetSupportDirectory();
+ objectDir = this->Convert(objectDir.c_str(),
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::SHELL);
+ vars.ObjectDir = objectDir.c_str();
vars.Target = targetOutPathReal.c_str();
vars.TargetPDB = targetOutPathPDB.c_str();
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 399b582..d6a0cd4 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -580,13 +580,11 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
vars.CMTarget = this->Target;
vars.Language = linkLanguage;
vars.Objects = buildObjs.c_str();
- std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
- objdir += this->Target->GetName();
- objdir += ".dir";
- objdir = this->Convert(objdir.c_str(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::SHELL);
- vars.ObjectDir = objdir.c_str();
+ std::string objectDir = this->Target->GetSupportDirectory();
+ objectDir = this->Convert(objectDir.c_str(),
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::SHELL);
+ vars.ObjectDir = objectDir.c_str();
vars.Target = targetOutPathReal.c_str();
vars.LinkLibraries = linkLibs.c_str();
vars.ObjectsQuoted = buildObjs.c_str();
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 6e70285..f82b808 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -647,7 +647,7 @@ cmMakefileTargetGenerator
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL).c_str();
vars.Object = shellObj.c_str();
- std::string objectDir = cmSystemTools::GetFilenamePath(obj);
+ std::string objectDir = this->Target->GetSupportDirectory();
objectDir = this->Convert(objectDir.c_str(),
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::SHELL);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index e3c058f..c8b03e1 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -568,7 +568,7 @@ cmNinjaTargetGenerator
}
EnsureParentDirectoryExists(objectFileName);
- std::string objectDir = cmSystemTools::GetFilenamePath(objectFileName);
+ std::string objectDir = this->Target->GetSupportDirectory();
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
ConvertToNinjaPath(objectDir.c_str()).c_str(),
cmLocalGenerator::SHELL);