summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-05-13 13:54:30 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-05-13 13:54:30 (GMT)
commit8c651793398848063945ab94e4e5f50c6bd7aaf8 (patch)
tree33f7bb6fbb7c77a523bb4e3bd413ea166152dfed /Source/cmLocalGenerator.h
parent9e5315fb5488830543d90da7c72ba012927e7323 (diff)
downloadCMake-8c651793398848063945ab94e4e5f50c6bd7aaf8.zip
CMake-8c651793398848063945ab94e4e5f50c6bd7aaf8.tar.gz
CMake-8c651793398848063945ab94e4e5f50c6bd7aaf8.tar.bz2
ENH: warning fixes and some first steps in cleaning up the convert code
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r--Source/cmLocalGenerator.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 859a799..036b3d2 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -76,6 +76,27 @@ public:
///! Set the Global Generator, done on creation by the GlobalGenerator
void SetGlobalGenerator(cmGlobalGenerator *gg);
+ /**
+ * Convert something to something else. This is a centralized coversion
+ * routine used by the generators to handle relative paths and the like.
+ * The flags determine what is actually done.
+ *
+ * relative: treat the argument as a directory and convert it to make it
+ * relative or full or unchanged. If relative (HOME, START etc) then that
+ * specifies what it should be relative to.
+ *
+ * output: make the result suitable for output to a...
+ *
+ * optional: should any relative path operation be controlled by the rel
+ * path setting
+ */
+ enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
+ enum OutputFormat { UNCHANGED, MAKEFILE, SHELL };
+ std::string Convert(const char* source,
+ RelativeRoot relative,
+ OutputFormat output = UNCHANGED,
+ bool optional = false);
+
/**
* Convert the given remote path to a relative path with respect to
* this generator's output directory. The remote path must use
@@ -206,7 +227,10 @@ protected:
// members used for relative path function ConvertToMakefilePath
std::string m_RelativePathToSourceDir;
std::string m_RelativePathToBinaryDir;
- std::vector<std::string> m_CurrentOutputDirectoryComponents;
+ std::vector<std::string> m_HomeDirectoryComponents;
+ std::vector<std::string> m_StartDirectoryComponents;
+ std::vector<std::string> m_HomeOutputDirectoryComponents;
+ std::vector<std::string> m_StartOutputDirectoryComponents;
bool m_ExcludeFromAll;
cmLocalGenerator* m_Parent;
std::vector<cmLocalGenerator*> Children;