[cmake-developers] [CMake 0016069]: Behaviour does not match documentation for policy CMP0048

Mantis Bug Tracker mantis at public.kitware.com
Sat Apr 16 03:49:05 EDT 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=16069 
====================================================================== 
Reported By:                Craig Scott
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16069
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-04-16 17:49 AEST
Last Modified:              2016-04-16 17:49 AEST
====================================================================== 
Summary:                    Behaviour does not match documentation for policy
CMP0048
Description: 
The policy documentation for CMP0048 says this:

"This policy was introduced in CMake version 3.0. CMake version 3.5.2 warns when
the policy is not set and uses OLD behavior. Use the cmake_policy command to set
it to OLD or NEW explicitly."

In my testing, however, no such warning is issued and the default appears to be
NEW, not OLD.

Steps to Reproduce: 
The following minimal CMakeLists.txt demonstrates the problem:

cmake_minimum_required(VERSION 3.5.2)
cmake_policy(GET CMP0048 isOn)
message("isOn = ${isOn}")
project(proj VERSION 1.2.3)

Changing the minimum required version doesn't seem to make any difference.

Additional Information: 
If you explicitly set the policy for CMP0048 to OLD, then the expected error
does occur when the project() command includes a VERSION specification.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-04-16 17:49 Craig Scott    New Issue                                    
======================================================================



More information about the cmake-developers mailing list