diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmake.cxx | 22 | ||||
-rw-r--r-- | Source/cmake.h | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index c9c63c714d..09d270d595 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -639,6 +639,7 @@ void cmake::SetArgs(const std::vector<std::string>& args, { bool directoriesSet = directoriesSetBefore; bool haveToolset = false; + bool havePlatform = false; for(unsigned int i=1; i < args.size(); ++i) { std::string arg = args[i]; @@ -767,6 +768,27 @@ void cmake::SetArgs(const std::vector<std::string>& args, "uninitialized variables.\n"; this->SetCheckSystemVars(true); } + else if(arg.find("-A",0) == 0) + { + std::string value = arg.substr(2); + if(value.size() == 0) + { + ++i; + if(i >= args.size()) + { + cmSystemTools::Error("No platform specified for -A"); + return; + } + value = args[i]; + } + if(havePlatform) + { + cmSystemTools::Error("Multiple -A options not allowed"); + return; + } + this->GeneratorPlatform = value; + havePlatform = true; + } else if(arg.find("-T",0) == 0) { std::string value = arg.substr(2); diff --git a/Source/cmake.h b/Source/cmake.h index 919fc249a3..60ffcd4de8 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -476,6 +476,7 @@ private: {"-U <globbing_expr>", "Remove matching entries from CMake cache."}, \ {"-G <generator-name>", "Specify a build system generator."},\ {"-T <toolset-name>", "Specify toolset name if supported by generator."}, \ + {"-A <platform-name>", "Specify platform name if supported by generator."}, \ {"-Wno-dev", "Suppress developer warnings."},\ {"-Wdev", "Enable developer warnings."} |