summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-02-24 21:04:54 (GMT)
committerBrad King <brad.king@kitware.com>2005-02-24 21:04:54 (GMT)
commitcb48e0c16178738c3d3bafd551f0f3e0b906c6c1 (patch)
treee6a6b05c3bf993e74eca255d6a00c70175956f1d /Source/cmLocalGenerator.h
parent9bf0811e34e7d26eb4aaf7bb250b1fd8be5cbb87 (diff)
downloadCMake-cb48e0c16178738c3d3bafd551f0f3e0b906c6c1.zip
CMake-cb48e0c16178738c3d3bafd551f0f3e0b906c6c1.tar.gz
CMake-cb48e0c16178738c3d3bafd551f0f3e0b906c6c1.tar.bz2
ENH: Merged implementations of ConvertToRelative*Path methods. The main ConvertToRelativePath method is now in cmGlobalGenerator. It converts paths only if they are at least inside the deepest common directory between the top-level source and build trees. Each cmLocalGenerator instance calls this global method with its own output directory as the "local" argument from which paths are relative. Added separate ConvertToOptionallyRelative path that pays attention to the CMAKE_USE_RELATIVE_PATHS option.
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r--Source/cmLocalGenerator.h36
1 files changed, 30 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index eaa9a8a..0932c76 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -77,8 +77,35 @@ public:
/** Get the full name of the target's file, without path. */
std::string GetFullTargetName(const char* n, const cmTarget& t);
- std::string ConvertToRelativeOutputPath(const char* p);
-
+ /**
+ * Convert the given remote path to a relative path with respect to
+ * this generator's output directory. The remote path must use
+ * forward slashes and not already be escaped or quoted.
+ */
+ std::string ConvertToRelativePath(const char* remote);
+
+ /**
+ * Convert to an output path that is relative to the current output
+ * directory. The remote path must use forward slashes and not
+ * already be escaped or quoted.
+ */
+ std::string ConvertToRelativeOutputPath(const char* remote);
+
+ /**
+ * Calls ConvertToRelativePath conditionally on the cache option
+ * CMAKE_USE_RELATIVE_PATHS. The remote path must use forward
+ * slashes and not already be escaped or quoted.
+ */
+ std::string ConvertToOptionallyRelativePath(const char* remote);
+
+ /**
+ * Convert the given path to an output path that is optionally
+ * relative based on the cache option CMAKE_USE_RELATIVE_PATHS. The
+ * remote path must use forward slashes and not already be escaped
+ * or quoted.
+ */
+ std::string ConvertToOptionallyRelativeOutputPath(const char* remote);
+
// flag to determine if this project should be included in a parent project
bool GetExcludeAll()
{
@@ -156,10 +183,7 @@ protected:
// members used for relative path function ConvertToMakefilePath
std::string m_RelativePathToSourceDir;
std::string m_RelativePathToBinaryDir;
- std::string m_CurrentOutputDirectory;
- std::string m_HomeOutputDirectory;
- std::string m_HomeDirectory;
- std::string m_HomeOutputDirectoryNoSlash;
+ std::vector<std::string> m_CurrentOutputDirectoryComponents;
bool m_ExcludeFromAll;
cmLocalGenerator* m_Parent;
std::map<cmStdString, cmStdString> m_LanguageToIncludeFlags;