[CMake] Why policy CMP0054 does not survive cmake_minimum_required?

Pere Mato Vila Pere.Mato at cern.ch
Thu Mar 5 12:50:09 EST 2015


On 04 Mar 2015, at 19:40, Nils Gladitz <nilsgladitz at gmail.com<mailto:nilsgladitz at gmail.com>> wrote:

cmake_minimum_required() resets all policies according to the given version.

CMP0005 was introduced in 2.6.0 so requiring 2.8.8 sets it to NEW.
CMP0054 was introduced in 3.1 so requiring 2.8.8 clears the policy (since it did not exist in 2.8.8).


Thanks very much for the explanation. Nevertheless I do not understand the logic. Running with 3.1 with the exactly the same code generates warnings that were not there in 2.8.8. In order to switch them off I need to set the policy to NEW, which gets cleared by requiring somehow a less restrictive condition.

Cheers,

Pere



-------------------------------------------------------------
Pere Mato  CERN, PH Department, CH 1211 Geneva 23, Switzerland
e-mail: pere.mato at cern.ch<mailto:pere.mato at cern.ch> tel:   +41 22 76 78696
fax:  +41 22 76 68792 gsm: +41 76 48 70855

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150305/b503dcd5/attachment.html>


More information about the CMake mailing list