diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 3 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.h | 2 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.cxx | 7 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.h | 1 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.h | 2 | ||||
-rw-r--r-- | Source/cmLocalXCodeGenerator.cxx | 7 | ||||
-rw-r--r-- | Source/cmLocalXCodeGenerator.h | 1 |
10 files changed, 39 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9912c6f..c5a836a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2772,6 +2772,18 @@ std::string cmLocalGenerator::EscapeForShell(const char* str, bool makeVars, } return std::string(&arg[0]); } + +//---------------------------------------------------------------------------- +std::string +cmLocalGenerator::GetTargetDirectory(cmTarget const&) const +{ + cmSystemTools::Error("GetTargetDirectory" + " called on cmLocalGenerator"); + return ""; +} + + +//---------------------------------------------------------------------------- void cmLocalGenerator::GetTargetObjectFileDirectories(cmTarget* , std::vector<std::string>& diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 90779a5..1c2128a 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -236,6 +236,12 @@ public: std::string ConvertToRelativePath(const std::vector<std::string>& local, const char* remote); + /** + * Get the relative path from the generator output directory to a + * per-target support directory. + */ + virtual std::string GetTargetDirectory(cmTarget const& target) const; + protected: /** Construct a comment for a custom command. */ diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index e60a5d2..3ba20f8 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1897,7 +1897,8 @@ cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p) //---------------------------------------------------------------------------- std::string -cmLocalUnixMakefileGenerator3::GetTargetDirectory(cmTarget& target) +cmLocalUnixMakefileGenerator3 +::GetTargetDirectory(cmTarget const& target) const { std::string dir = cmake::GetCMakeFilesDirectoryPostSlash(); dir += target.GetName(); diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 8f9bef7..bc3f7d6 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -188,7 +188,7 @@ public: void AppendEcho(std::vector<std::string>& commands, const char* text, EchoColor color = EchoNormal); - static std::string GetTargetDirectory(cmTarget& target); + virtual std::string GetTargetDirectory(cmTarget const& target) const; // create a command that cds to the start dir then runs the commands void CreateCDCommand(std::vector<std::string>& commands, diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index a3e0769..0a48d83 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -1567,6 +1567,13 @@ void cmLocalVisualStudio6Generator } } +std::string +cmLocalVisualStudio6Generator +::GetTargetDirectory(cmTarget const&) const +{ + // No per-target directory for this generator (yet). + return ""; +} void cmLocalVisualStudio6Generator ::GetTargetObjectFileDirectories(cmTarget* , diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h index 97d45d4..d97a8db 100644 --- a/Source/cmLocalVisualStudio6Generator.h +++ b/Source/cmLocalVisualStudio6Generator.h @@ -62,6 +62,7 @@ public: { return this->CreatedProjectNames; } + virtual std::string GetTargetDirectory(cmTarget const& target) const; void GetTargetObjectFileDirectories(cmTarget* target, std::vector<std::string>& dirs); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index c4d7a35..5f9ab7a 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1619,7 +1619,7 @@ void cmLocalVisualStudio7Generator::ConfigureFinalPass() //---------------------------------------------------------------------------- std::string cmLocalVisualStudio7Generator -::GetTargetDirectory(cmTarget& target) +::GetTargetDirectory(cmTarget const& target) const { std::string dir; dir += target.GetName(); diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index d676108..508c368 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -113,7 +113,7 @@ private: void WriteGroup(const cmSourceGroup *sg, cmTarget target, std::ostream &fout, const char *libName, std::vector<std::string> *configs); - virtual std::string GetTargetDirectory(cmTarget&); + virtual std::string GetTargetDirectory(cmTarget const&) const; cmVS7FlagTable const* ExtraFlagTable; std::string ModuleDefinitionFile; diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx index 27a9190..7f60402 100644 --- a/Source/cmLocalXCodeGenerator.cxx +++ b/Source/cmLocalXCodeGenerator.cxx @@ -13,6 +13,13 @@ cmLocalXCodeGenerator::~cmLocalXCodeGenerator() { } +std::string +cmLocalXCodeGenerator::GetTargetDirectory(cmTarget const&) const +{ + // No per-target directory for this generator (yet). + return ""; +} + void cmLocalXCodeGenerator:: GetTargetObjectFileDirectories(cmTarget* target, std::vector<std::string>& diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h index b265d6b..456fc05 100644 --- a/Source/cmLocalXCodeGenerator.h +++ b/Source/cmLocalXCodeGenerator.h @@ -35,6 +35,7 @@ public: void GetTargetObjectFileDirectories(cmTarget* target, std::vector<std::string>& dirs); + virtual std::string GetTargetDirectory(cmTarget const& target) const; private: }; |