summaryrefslogtreecommitdiffstats
path: root/Source/cmState.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-04 21:01:29 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-16 06:11:33 (GMT)
commit57bdc1a2f7d416c106c4bef8f3543eec74c3c391 (patch)
tree35f8d079bab6b86e79472663bd6a582fab2be7fa /Source/cmState.h
parentebf8a41984f591dbd6c22735aec7f2b1c36c9e0a (diff)
downloadCMake-57bdc1a2f7d416c106c4bef8f3543eec74c3c391.zip
CMake-57bdc1a2f7d416c106c4bef8f3543eec74c3c391.tar.gz
CMake-57bdc1a2f7d416c106c4bef8f3543eec74c3c391.tar.bz2
cmState: Compute and store directory components.
There is no need to duplicate these in all cmLocalGenerators. Rename the symbols according to current conventions. Add explicit calls to Set{Source,Binary}Directory with empty strings in order to trigger the population of the components containers with the current working directory in cmLocalGenerator. Having directories set to empty is a special case in CMake, which is relied on for the `if(CMAKE_BINARY_DIR)` condition at the end of CMakeDetermineSystem.cmake.
Diffstat (limited to 'Source/cmState.h')
-rw-r--r--Source/cmState.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmState.h b/Source/cmState.h
index ed58c64..956b4f4 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -123,6 +123,9 @@ public:
const char* GetBinaryDirectory() const;
void SetBinaryDirectory(std::string const& binaryDirectory);
+ std::vector<std::string> const& GetSourceDirectoryComponents() const;
+ std::vector<std::string> const& GetBinaryDirectoryComponents() const;
+
private:
std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
std::vector<std::string> EnabledLanguages;
@@ -132,6 +135,9 @@ private:
std::vector<std::string> Locations;
std::vector<std::string> OutputLocations;
std::vector<PositionType> ParentPositions;
+
+ std::vector<std::string> SourceDirectoryComponents;
+ std::vector<std::string> BinaryDirectoryComponents;
std::string SourceDirectory;
std::string BinaryDirectory;
bool IsInTryCompile;