mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
Merge topic 'Intel-Fortran-warn-errors'
13f3382b1cIntel/IntelLLVM: Fortran has distinct "-Werror"-like flagab8a0a106eCOMPILE_WARNING_AS_ERROR: Fix internal formatting of options table Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7758
This commit is contained in:
@@ -1030,10 +1030,14 @@ void cmLocalGenerator::AddCompileOptions(std::vector<BT<std::string>>& flags,
|
||||
// Add Warning as errors flags
|
||||
if (!this->GetCMakeInstance()->GetIgnoreWarningAsError()) {
|
||||
const cmValue wError = target->GetProperty("COMPILE_WARNING_AS_ERROR");
|
||||
const cmValue wErrorFlag = this->Makefile->GetDefinition(
|
||||
const cmValue wErrorOpts = this->Makefile->GetDefinition(
|
||||
cmStrCat("CMAKE_", lang, "_COMPILE_OPTIONS_WARNING_AS_ERROR"));
|
||||
if (wError.IsOn() && wErrorFlag.IsSet()) {
|
||||
flags.emplace_back(wErrorFlag);
|
||||
if (wError.IsOn() && wErrorOpts.IsSet()) {
|
||||
std::string wErrorFlags;
|
||||
this->AppendCompileOptions(wErrorFlags, *wErrorOpts);
|
||||
if (!wErrorFlags.empty()) {
|
||||
flags.emplace_back(std::move(wErrorFlags));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user