[cmake] add -Wno-error to mathcore and minuit
In MathCore and Minuit there are warnings stemming from -Winconsistent-missing-override (like: 'Gradient' overrides a member function but is not marked 'override').
Applying the suggested fix doesn't work because the functions in question are only conditionally overriding a base class function, depending on the type used as their CRTP argument.
This should probably be fixed in a better way, but in the meantime this commit allows building ROOT with dev=ON, which now fails.
Alternative suggestion:
use in the five involved places:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winconsistent-missing-override"
virtual Gradient()...;
#pragma GCC diagnostic pop
The proper solution would be to not make that function conditionally virtual, but that requires some thought and knowledge of the code which I don't have at the moment..
Silencing the warning should be done only if no good alternative is found.
Test Results
19 files 19 suites 3d 22h 36m 56s ⏱️ 2 816 tests 2 811 ✅ 0 💤 5 ❌ 52 002 runs 51 862 ✅ 135 💤 5 ❌
For more details on these failures, see this check.
Results for commit 8b558195.
@lmoneta
Alternative PR: https://github.com/root-project/root/pull/19070
Superseded by https://github.com/root-project/root/pull/19070