[CMake] Policy Scope Question

Richard Wackerbarth richard at NFSNet.org
Thu Dec 31 11:30:09 EST 2009


Checking Project CMake/2_8.
Running Dashboard for CMake/2_8.
Problem opening /proc/cpuinfo
Problem opening /proc/cpuinfo
Problem opening /proc/cpuinfo
CMake Warning (dev) at Dashboards/Scripts/Possibly_Run_Dashboard.cmake:14 (include):
  Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
  and POP.  Run "cmake --help-policy CMP0011" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  The included script

    /home/dashboard/Dashboards/Scripts/Run_Dashboard.cmake

  affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
  compatibility, so the effects are applied to the including context.
Call Stack (most recent call first):
  Dashboards/Scripts/GenericFunctions.cmake:77 (include)
  Dashboards/Scripts/Call_process_dashboard.cmake:11 (process_dashboard)
  Dashboards/Scripts/GenericFunctions.cmake:19 (include)
  Dashboards/Scripts/AutoStart.cmake:21 (do_all)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at Dashboards/Scripts/GenericFunctions.cmake:77 (include):
  Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
  and POP.  Run "cmake --help-policy CMP0011" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  The included script

    /home/dashboard/Dashboards/Scripts/Possibly_Run_Dashboard.cmake

  affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
  compatibility, so the effects are applied to the including context.
Call Stack (most recent call first):
  Dashboards/Scripts/Call_process_dashboard.cmake:11 (process_dashboard)
  Dashboards/Scripts/GenericFunctions.cmake:19 (include)
  Dashboards/Scripts/AutoStart.cmake:21 (do_all)
This warning is for project developers.  Use -Wno-dev to suppress it.

Checking Project CMake/2_9.

On Dec 31, 2009, at 6:57 AM, Alexander Neundorf wrote:

> On Tuesday 29 December 2009, Richard Wackerbarth wrote:
>> I have a question about policy CMP0011.
>> 
>> I have:
>> $ cat Call_process_dashboard.cmake
>> 
>> # Call process_dashboard
>> 
>> # These files are maintained by Richard Wackerbarth
>> set(maintainer_email_account "Richard")
>> set(maintainer_email_domain "NFSNet.org")
>> 
>> IF(COMMAND CMAKE_POLICY)
>>  CMAKE_POLICY(SET CMP0011 NEW)
>> ENDIF(COMMAND CMAKE_POLICY)
>> 
>> process_dashboard (${project} ${branch})
>> 
>> $
>> 
>>> From my reading of its definition, setting CMP0011 to NEW should suppress
>>> all complaints about changes to policy in any subordinate scopes.
>> 
>> Thus shouldn't any policy changes make within process_dashboard() be OK and
>> not generate any warning?
> 
> What warnings do you get ?
> 
> Alex


More information about the CMake mailing list