|
@@ -5,6 +5,7 @@
|
|
|
#include <algorithm>
|
|
#include <algorithm>
|
|
|
#include <array>
|
|
#include <array>
|
|
|
#include <cassert>
|
|
#include <cassert>
|
|
|
|
|
+#include <cctype>
|
|
|
#include <cstdio>
|
|
#include <cstdio>
|
|
|
#include <cstdlib>
|
|
#include <cstdlib>
|
|
|
#include <initializer_list>
|
|
#include <initializer_list>
|
|
@@ -3356,10 +3357,22 @@ void cmLocalGenerator::AppendLinkerTypeFlags(std::string& flags,
|
|
|
this->AppendFlags(flags, linkerFlags);
|
|
this->AppendFlags(flags, linkerFlags);
|
|
|
}
|
|
}
|
|
|
} else if (linkerType != "DEFAULT"_s) {
|
|
} else if (linkerType != "DEFAULT"_s) {
|
|
|
- this->IssueMessage(MessageType::FATAL_ERROR,
|
|
|
|
|
- cmStrCat("LINKER_TYPE '", linkerType,
|
|
|
|
|
- "' is unknown. Did you forgot to define '",
|
|
|
|
|
- usingLinker, "' variable?"));
|
|
|
|
|
|
|
+ auto isCMakeLinkerType = [](const std::string& type) -> bool {
|
|
|
|
|
+ return std::all_of(type.cbegin(), type.cend(),
|
|
|
|
|
+ [](char c) { return std::isupper(c); });
|
|
|
|
|
+ };
|
|
|
|
|
+ if (isCMakeLinkerType(linkerType)) {
|
|
|
|
|
+ this->IssueMessage(
|
|
|
|
|
+ MessageType::FATAL_ERROR,
|
|
|
|
|
+ cmStrCat("LINKER_TYPE '", linkerType,
|
|
|
|
|
+ "' is unknown or not supported by this toolchain."));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this->IssueMessage(
|
|
|
|
|
+ MessageType::FATAL_ERROR,
|
|
|
|
|
+ cmStrCat("LINKER_TYPE '", linkerType,
|
|
|
|
|
+ "' is unknown. Did you forget to define the '", usingLinker,
|
|
|
|
|
+ "' variable?"));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|