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.
This commit is contained in:
parent
367e5c37bb
commit
5aa535bdcb
|
@ -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];
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue