summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCommonTargetGenerator.cxx10
-rw-r--r--Source/cmCommonTargetGenerator.h4
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
4 files changed, 12 insertions, 6 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index eb93ebc..8a5746a 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -20,8 +20,12 @@
#include "cmSystemTools.h"
#include "cmTarget.h"
-cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt)
- : GeneratorTarget(gt)
+cmCommonTargetGenerator::cmCommonTargetGenerator(
+ cmOutputConverter::RelativeRoot wd,
+ cmGeneratorTarget* gt
+ )
+ : WorkingDirectory(wd)
+ , GeneratorTarget(gt)
, Target(gt->Target)
, Makefile(gt->Makefile)
, LocalGenerator(static_cast<cmLocalCommonGenerator*>(gt->LocalGenerator))
@@ -152,7 +156,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
if (!mod_dir.empty())
{
mod_dir = this->Convert(mod_dir,
- cmLocalGenerator::START_OUTPUT,
+ this->WorkingDirectory,
cmLocalGenerator::SHELL);
}
else
diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h
index aec3148..5fd976d 100644
--- a/Source/cmCommonTargetGenerator.h
+++ b/Source/cmCommonTargetGenerator.h
@@ -29,7 +29,8 @@ class cmTarget;
class cmCommonTargetGenerator
{
public:
- cmCommonTargetGenerator(cmGeneratorTarget* gt);
+ cmCommonTargetGenerator(cmOutputConverter::RelativeRoot wd,
+ cmGeneratorTarget* gt);
virtual ~cmCommonTargetGenerator();
std::string const& GetConfigName() const;
@@ -46,6 +47,7 @@ protected:
// Helper to add flag for windows .def file.
void AddModuleDefinitionFlag(std::string& flags);
+ cmOutputConverter::RelativeRoot WorkingDirectory;
cmGeneratorTarget* GeneratorTarget;
cmTarget* Target;
cmMakefile* Makefile;
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 5a2333d..1304258 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -33,7 +33,7 @@
#include <ctype.h>
cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
- : cmCommonTargetGenerator(target)
+ : cmCommonTargetGenerator(cmOutputConverter::START_OUTPUT, target)
, OSXBundleGenerator(0)
, MacOSXContentGenerator(0)
{
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index addf292..4e4dc3f 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -58,7 +58,7 @@ cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
}
cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmGeneratorTarget* target)
- : cmCommonTargetGenerator(target),
+ : cmCommonTargetGenerator(cmOutputConverter::HOME_OUTPUT, target),
MacOSXContentGenerator(0),
OSXBundleGenerator(0),
MacContentFolders(),