Originally at https://github.com/FlightGear/simgear/pull/2
Fixes next error:
CMake Error at CMakeModules/BoostTestTargets.cmake:55 (message):
NOTE: boost::test-based targets and tests cannot be added: boost >= 1.34.0
required but not found. (found: '1.71.0' want >=103400) You may disable
ENABLE_TESTS to continue without the tests.
Call Stack (most recent call first):
CMakeLists.txt:220 (include)
We're discussoing work arounds to this on the mailing list at the moment.
Great. Found it https://sourceforge.net/p/flightgear/mailman/message/36778139/ .
Note that this change should be compatible with old CMake.
I see discussion there right now is going around switching that policy to
OLDbehavior. Please not that it is already supposed to be turned to that state by default in 3.15.4 as per https://cmake.org/cmake/help/v3.15/policy/CMP0093.html . But for some reason in 3.15.3 it is turned toNEWand attempt to switch toOLDdidn't work for me (neither by in-cmake statement nor via specifying-DCMAKE_POLICY_DEFAULT_CMP0093=OLD).As far as I understand those policies supposed to warn about using default
OLDwhen you don't turn them toNEW(though this partgicular should silently useOLD). I guess minimal version of cmake specified inCMakeLists.txtalso have some effect on when that warning emitted. But in my case (3.15.3) I didn't got any warnings rather than justNEWbehavior.Last edit: Mykola Orliuk 2019-10-07
I've pushed your change becuase I have the same problem in my CMake install (NEw is the default, and OLD doesn't work).
I have also asked about this on the CMake list, and so far no one answered.