Silence CMake warning about policy CMP0071
ClosedPublic

Authored by christiand on Jan 28 2018, 4:39 PM.

Details

Summary

This policy was introduced in CMake 3.10 and will annoy users until we set that CMake version as minimum. Probably we do not require this feature, yet. It is only set to old, to prevent accidential use of the new behavour. If the new behaviour becomes important, cmake_minimum_required has to be set to "3.10".

Test Plan

Run cmake .

Diff Detail

Repository
R261 KMyMoney
Branch
arcpatch-D10162
Lint
No Linters Available
Unit
No Unit Test Coverage
christiand requested review of this revision.Jan 28 2018, 4:39 PM
christiand created this revision.
wojnilowicz accepted this revision.Jan 28 2018, 4:42 PM
This revision is now accepted and ready to land.Jan 28 2018, 4:42 PM
tbaumgart accepted this revision.Jan 28 2018, 5:00 PM
tbaumgart added a subscriber: tbaumgart.

Please land onto 5.0

christiand updated this revision to Diff 26147.Jan 28 2018, 6:54 PM
christiand edited the test plan for this revision. (Show Details)
This comment was removed by christiand.
christiand updated this revision to Diff 26148.Jan 28 2018, 7:13 PM

Reverted last change - I am fighting with arc :(

I saw once, that the OLD behavior may cause other warnings. However, I cannot reproduce this. Since I am not able to push currently, I will observe this and push later (to branch 5.0).

I found a new warning which is generated by this patch. However, I would leave it as it is, because there will be a warning or we may miss when a change to CMake 3.10 becomes mandatory.

CMake Warning (dev) in kmymoney/CMakeLists.txt:
  Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
  Run "cmake --help-policy CMP0071" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  For compatibility, CMake is excluding the GENERATED source file(s):

    "⟨…⟩/Develop/build/kmymoney/kmymoney/qrc_kmymoney.cpp"

  from processing by AUTOMOC.  If any of the files should be processed, set
  CMP0071 to NEW.  If any of the files should not be processed, explicitly
  exclude them by setting the source file property SKIP_AUTOMOC:

    set_property(SOURCE file.h PROPERTY SKIP_AUTOMOC ON)

This warning is for project developers.  Use -Wno-dev to suppress it.
This revision was automatically updated to reflect the committed changes.