Fix build with older cmake
ClosedPublic

Authored by wbauer on Aug 7 2019, 12:46 PM.

Details

Summary

Setting the cmake_policy fails if an older cmake version is used, so only set it to 3.10 if cmake is really 3.10 or higher.

Test Plan

Building with cmake 3.5.2 succeeds again, before I got this error:

CMake Error at CMakeLists.txt:11 (cmake_policy):
  An attempt was made to set the policy version of CMake to "3.10" which is
  greater than this version of CMake.  This is not allowed because the
  greater version may have new policies not known to this CMake.  You may
  need a newer CMake version to build this project.

The warnings that appeared with cmake 3.10+ earlier (before 56ec6f23e9c4cc99c5c7d28f312b580755cbd285) are still gone.

Diff Detail

Repository
R336 KTouch
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wbauer created this revision.Aug 7 2019, 12:46 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptAug 7 2019, 12:46 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
wbauer requested review of this revision.Aug 7 2019, 12:46 PM
gottfried accepted this revision.Aug 7 2019, 3:08 PM
This revision is now accepted and ready to land.Aug 7 2019, 3:08 PM
This revision was automatically updated to reflect the committed changes.