mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-29 04:09:35 +03:00
OpenWatcom: Add workaround for lack of error on missing library
The OpenWatcom tools do not fail to link when a library is missing if no symbols were needed from it. This can break `try_compile` checks. Teach `cmGlobalGenerator::Build` to pretend that the build tool returned non-zero if the output contains the corresponding warning.
This commit is contained in:
1 parent
12139ad009
commit
3c47ac5b25
1 file changed
+7
@@ -1893,6 +1893,13 @@ int cmGlobalGenerator::Build(const std::string& /*unused*/,
|
||||
retVal = 1;
|
||||
}
|
||||
|
||||
// The OpenWatcom tools do not return an error code when a link
|
||||
// library is not found!
|
||||
if (this->CMakeInstance->GetState()->UseWatcomWMake() && retVal == 0 &&
|
||||
output.find("W1008: cannot open") != std::string::npos) {
|
||||
retVal = 1;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user