[cmake-developers] [CMake 0012458]: cmake_minimum_required clears policies
Mantis Bug Tracker
mantis at public.kitware.com
Wed Sep 14 19:27:58 EDT 2011
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=12458
======================================================================
Reported By: Stephen Kelly
Assigned To:
======================================================================
Project: CMake
Issue ID: 12458
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-09-14 19:27 EDT
Last Modified: 2011-09-14 19:27 EDT
======================================================================
Summary: cmake_minimum_required clears policies
Description:
The attached project contains the line
cmake_policy(SET CMP0017 NEW)
but also warns about the policy not being set:
$ cmake ..
CMake Warning (dev) at /usr/share/cmake-2.8/Modules/FeatureSummary.cmake:112
(INCLUDE):
File /usr/share/cmake-2.8/Modules/FeatureSummary.cmake includes
/home/stephen/dev/src/playground/cmakebugs/CMakeParseArguments.cmake (found
via CMAKE_MODULE_PATH) which shadows
/usr/share/cmake-2.8/Modules/CMakeParseArguments.cmake. This may cause
errors later on .
Policy CMP0017 is not set: Prefer files from the CMake module directory
when including from there. Run "cmake --help-policy CMP0017" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Call Stack (most recent call first):
sub1/CMakeLists.txt:4 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/stephen/dev/src/playground/cmakebugs/build
The warning does not appear if the cmake_minimum_required line in
sub1/CMakeLists.txt is removed.
The documentation of cmake_minimum_required notes that the policy is implicitly
set to the cmake version specified. However I still found it surprising that it
clears all existing policies.
If this is intentional, it should probably be in the cmake_minimum_required
documentation.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-09-14 19:27 Stephen Kelly New Issue
2011-09-14 19:27 Stephen Kelly File Added: policybug.tar.gz
======================================================================
More information about the cmake-developers
mailing list