summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-10-09 19:30:07 (GMT)
committerBrad King <brad.king@kitware.com>2008-10-09 19:30:07 (GMT)
commitad44a41a187fc3a1b829397e1c9f7c5f305c084b (patch)
tree39e49f9e554aa602fae42ff084cf628a81f9166a /Source/cmLocalGenerator.h
parent416bf5730f33b5760bbcea9b4fb871cc9d717c6a (diff)
downloadCMake-ad44a41a187fc3a1b829397e1c9f7c5f305c084b.zip
CMake-ad44a41a187fc3a1b829397e1c9f7c5f305c084b.tar.gz
CMake-ad44a41a187fc3a1b829397e1c9f7c5f305c084b.tar.bz2
ENH: Fix optional use of relative paths.
These changes refactor cmLocalGenerator methods Convert and ConvertToOutputForExisting to support references inside the build tree using relative paths. After this commit, all tests pass with Makefile generators when relative paths are enabled by default. See issue #7779.
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r--Source/cmLocalGenerator.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index d528d2f..9af44c9 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -108,10 +108,18 @@ public:
*/
enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
enum OutputFormat { UNCHANGED, MAKEFILE, SHELL };
- std::string Convert(const char* source,
- RelativeRoot relative,
+ std::string ConvertToOutputFormat(const char* source, OutputFormat output);
+ std::string Convert(const char* remote, RelativeRoot local,
OutputFormat output = UNCHANGED,
bool optional = false);
+ std::string Convert(RelativeRoot remote, const char* local,
+ OutputFormat output = UNCHANGED,
+ bool optional = false);
+
+ /**
+ * Get path for the specified relative root.
+ */
+ const char* GetRelativeRootPath(RelativeRoot relroot);
/**
* Convert the given path to an output path that is optionally
@@ -162,7 +170,13 @@ public:
std::string GetRealLocation(const char* inName, const char* config);
///! for existing files convert to output path and short path if spaces
- std::string ConvertToOutputForExisting(const char* p);
+ std::string ConvertToOutputForExisting(const char* remote,
+ RelativeRoot local = START_OUTPUT);
+
+ /** For existing path identified by RelativeRoot convert to output
+ path and short path if spaces. */
+ std::string ConvertToOutputForExisting(RelativeRoot remote,
+ const char* local = 0);
/** Called from command-line hook to clear dependencies. */
virtual void ClearDependencies(cmMakefile* /* mf */,
@@ -386,6 +400,9 @@ protected:
unsigned int BackwardsCompatibility;
bool BackwardsCompatibilityFinal;
+private:
+ std::string ConvertToOutputForExistingCommon(const char* remote,
+ std::string const& result);
};
#endif