diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-10-05 17:44:28 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-10-05 17:44:28 (GMT) |
commit | 5aa535bdcb9d1148690e55b601e1c8f8763f842c (patch) | |
tree | c4ea565b4d89c51c69749005bd5c241e2d6562b1 | |
parent | 367e5c37bbaba8f2169ed5a56e553e9327b8951a (diff) | |
download | CMake-5aa535bdcb9d1148690e55b601e1c8f8763f842c.zip CMake-5aa535bdcb9d1148690e55b601e1c8f8763f842c.tar.gz CMake-5aa535bdcb9d1148690e55b601e1c8f8763f842c.tar.bz2 |
Add argument to arg parsing to not set directories
Argument parsing sets the source/build directories, but they may have
been (meaningfully) set before hand. Let's not overwrite them.
-rw-r--r-- | Source/cmake.cxx | 4 | ||||
-rw-r--r-- | Source/cmake.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 07abc8e..845ab9b 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -524,9 +524,9 @@ void cmake::ReadListFile(const char *path) } // Parse the args -void cmake::SetArgs(const std::vector<std::string>& args) +void cmake::SetArgs(const std::vector<std::string>& args, bool directoriesSetBefore) { - bool directoriesSet = false; + bool directoriesSet = directoriesSetBefore; for(unsigned int i=1; i < args.size(); ++i) { std::string arg = args[i]; diff --git a/Source/cmake.h b/Source/cmake.h index 72effd3..36c0f4a 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -212,7 +212,7 @@ class cmake bool CommandExists(const char* name) const; ///! Parse command line arguments - void SetArgs(const std::vector<std::string>&); + void SetArgs(const std::vector<std::string>&, bool directoriesSetBefore = false); ///! Is this cmake running as a result of a TRY_COMPILE command bool GetIsInTryCompile() { return this->InTryCompile; } |