summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalGeneratorFactory.h4
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio11Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio12Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio9Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx6
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx3
-rw-r--r--Source/cmake.cxx4
-rw-r--r--Source/cmake.h2
10 files changed, 20 insertions, 19 deletions
diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h
index 3a7f806..d6ababb 100644
--- a/Source/cmGlobalGeneratorFactory.h
+++ b/Source/cmGlobalGeneratorFactory.h
@@ -25,7 +25,7 @@ public:
/** Create a GlobalGenerator */
virtual std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& n, cmake* cm) const = 0;
+ const std::string& n, bool allowArch, cmake* cm) const = 0;
/** Get the documentation entry for this factory */
virtual void GetDocumentation(cmDocumentationEntry& entry) const = 0;
@@ -53,7 +53,7 @@ class cmGlobalGeneratorSimpleFactory : public cmGlobalGeneratorFactory
public:
/** Create a GlobalGenerator */
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override
+ const std::string& name, bool /*allowArch*/, cmake* cm) const override
{
if (name != T::GetActualName()) {
return std::unique_ptr<cmGlobalGenerator>();
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 3805546..7794df3 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -59,7 +59,7 @@ class cmGlobalVisualStudio10Generator::Factory
{
public:
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override
+ const std::string& name, bool allowArch, cmake* cm) const override
{
std::string genName;
const char* p = cmVS10GenName(name, genName);
@@ -70,7 +70,7 @@ public:
return std::unique_ptr<cmGlobalGenerator>(
new cmGlobalVisualStudio10Generator(cm, genName, ""));
}
- if (*p++ != ' ') {
+ if (!allowArch || *p++ != ' ') {
return std::unique_ptr<cmGlobalGenerator>();
}
if (strcmp(p, "Win64") == 0) {
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index a385375..a5ffcf0 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -31,7 +31,7 @@ class cmGlobalVisualStudio11Generator::Factory
{
public:
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override
+ const std::string& name, bool allowArch, cmake* cm) const override
{
std::string genName;
const char* p = cmVS11GenName(name, genName);
@@ -42,7 +42,7 @@ public:
return std::unique_ptr<cmGlobalGenerator>(
new cmGlobalVisualStudio11Generator(cm, genName, ""));
}
- if (*p++ != ' ') {
+ if (!allowArch || *p++ != ' ') {
return std::unique_ptr<cmGlobalGenerator>();
}
if (strcmp(p, "Win64") == 0) {
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index 5a27994..8bdf356 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -29,7 +29,7 @@ class cmGlobalVisualStudio12Generator::Factory
{
public:
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override
+ const std::string& name, bool allowArch, cmake* cm) const override
{
std::string genName;
const char* p = cmVS12GenName(name, genName);
@@ -40,7 +40,7 @@ public:
return std::unique_ptr<cmGlobalGenerator>(
new cmGlobalVisualStudio12Generator(cm, genName, ""));
}
- if (*p++ != ' ') {
+ if (!allowArch || *p++ != ' ') {
return std::unique_ptr<cmGlobalGenerator>();
}
if (strcmp(p, "Win64") == 0) {
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index a12b7e1..e17c6d7 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -30,7 +30,7 @@ class cmGlobalVisualStudio14Generator::Factory
{
public:
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override
+ const std::string& name, bool allowArch, cmake* cm) const override
{
std::string genName;
const char* p = cmVS14GenName(name, genName);
@@ -41,7 +41,7 @@ public:
return std::unique_ptr<cmGlobalGenerator>(
new cmGlobalVisualStudio14Generator(cm, genName, ""));
}
- if (*p++ != ' ') {
+ if (!allowArch || *p++ != ' ') {
return std::unique_ptr<cmGlobalGenerator>();
}
if (strcmp(p, "Win64") == 0) {
diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx
index 9f73c15..2339a80 100644
--- a/Source/cmGlobalVisualStudio9Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Generator.cxx
@@ -16,7 +16,7 @@ class cmGlobalVisualStudio9Generator::Factory : public cmGlobalGeneratorFactory
{
public:
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override
+ const std::string& name, bool allowArch, cmake* cm) const override
{
if (strncmp(name.c_str(), vs9generatorName,
sizeof(vs9generatorName) - 1) != 0) {
@@ -29,7 +29,7 @@ public:
new cmGlobalVisualStudio9Generator(cm, name, ""));
}
- if (p[0] != ' ') {
+ if (!allowArch || p[0] != ' ') {
return std::unique_ptr<cmGlobalGenerator>();
}
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index 4b877ce..95357e7 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -140,7 +140,7 @@ class cmGlobalVisualStudioVersionedGenerator::Factory15
{
public:
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override
+ const std::string& name, bool allowArch, cmake* cm) const override
{
std::string genName;
const char* p = cmVS15GenName(name, genName);
@@ -152,7 +152,7 @@ public:
new cmGlobalVisualStudioVersionedGenerator(
cmGlobalVisualStudioGenerator::VS15, cm, genName, ""));
}
- if (*p++ != ' ') {
+ if (!allowArch || *p++ != ' ') {
return std::unique_ptr<cmGlobalGenerator>();
}
if (strcmp(p, "Win64") == 0) {
@@ -234,7 +234,7 @@ class cmGlobalVisualStudioVersionedGenerator::Factory16
{
public:
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override
+ const std::string& name, bool /*allowArch*/, cmake* cm) const override
{
std::string genName;
const char* p = cmVS16GenName(name, genName);
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f1a1ce6..952a179 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -135,7 +135,7 @@ class cmGlobalXCodeGenerator::Factory : public cmGlobalGeneratorFactory
{
public:
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name, cmake* cm) const override;
+ const std::string& name, bool allowArch, cmake* cm) const override;
void GetDocumentation(cmDocumentationEntry& entry) const override
{
@@ -197,6 +197,7 @@ std::unique_ptr<cmGlobalGeneratorFactory> cmGlobalXCodeGenerator::NewFactory()
std::unique_ptr<cmGlobalGenerator>
cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(const std::string& name,
+ bool /*allowArch*/,
cmake* cm) const
{
if (name != GetActualName()) {
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index dc06fae..9f84378 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1217,7 +1217,7 @@ createExtraGenerator(
}
std::unique_ptr<cmGlobalGenerator> cmake::CreateGlobalGenerator(
- const std::string& gname)
+ const std::string& gname, bool allowArch)
{
std::pair<std::unique_ptr<cmExternalMakefileProjectGenerator>, std::string>
extra = createExtraGenerator(this->ExtraGenerators, gname);
@@ -1227,7 +1227,7 @@ std::unique_ptr<cmGlobalGenerator> cmake::CreateGlobalGenerator(
std::unique_ptr<cmGlobalGenerator> generator;
for (const auto& g : this->Generators) {
- generator = g->CreateGlobalGenerator(name, this);
+ generator = g->CreateGlobalGenerator(name, allowArch, this);
if (generator) {
break;
}
diff --git a/Source/cmake.h b/Source/cmake.h
index 63635cb..525af32 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -219,7 +219,7 @@ public:
//! Create a GlobalGenerator
std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator(
- const std::string& name);
+ const std::string& name, bool allowArch = true);
//! Return the global generator assigned to this instance of cmake
cmGlobalGenerator* GetGlobalGenerator()