|
@@ -5,6 +5,7 @@
|
|
|
#include <algorithm>
|
|
|
#include <array>
|
|
|
#include <cassert>
|
|
|
+#include <cctype>
|
|
|
#include <cerrno>
|
|
|
#include <cstddef>
|
|
|
#include <cstdio>
|
|
@@ -5585,11 +5586,22 @@ std::string cmGeneratorTarget::GetLinkerTool(const std::string& lang,
|
|
|
linkerTool = this->Makefile->GetDefinition("CMAKE_LINKER");
|
|
|
|
|
|
if (linkerType != "DEFAULT"_s) {
|
|
|
- this->LocalGenerator->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->LocalGenerator->IssueMessage(
|
|
|
+ MessageType::FATAL_ERROR,
|
|
|
+ cmStrCat("LINKER_TYPE '", linkerType,
|
|
|
+ "' is unknown or not supported by this toolchain."));
|
|
|
+ } else {
|
|
|
+ this->LocalGenerator->IssueMessage(
|
|
|
+ MessageType::FATAL_ERROR,
|
|
|
+ cmStrCat("LINKER_TYPE '", linkerType,
|
|
|
+ "' is unknown. Did you forget to define the '", usingLinker,
|
|
|
+ "' variable?"));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|