<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 05.03.2015 18:50, Pere Mato Vila
      wrote:<br>
    </div>
    <blockquote cite="mid:85F4BE57-2CB0-442A-B645-AE26CD094F67@cern.ch"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <br class="">
      <div>
        <blockquote type="cite" class="">
          <div class="">On 04 Mar 2015, at 19:40, Nils Gladitz <<a
              moz-do-not-send="true" href="mailto:nilsgladitz@gmail.com"
              class="">nilsgladitz@gmail.com</a>> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class=""><span style="font-family: Helvetica; font-size:
              12px; font-style: normal; font-variant: normal;
              font-weight: normal; letter-spacing: normal; line-height:
              normal; orphans: auto; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal; widows:
              auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255); float: none;
              display: inline !important;" class="">cmake_minimum_required()

              resets all policies according to the given version.</span><br
              style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
            <br style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
            <span style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255); float: none;
              display: inline !important;" class="">CMP0005 was
              introduced in 2.6.0 so requiring 2.8.8 sets it to NEW.</span><br
              style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
            <span style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255); float: none;
              display: inline !important;" class="">CMP0054 was
              introduced in 3.1 so requiring 2.8.8 clears the policy
              (since it did not exist in 2.8.8).</span><br
              style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
          </div>
        </blockquote>
        <br class="">
      </div>
      <div><br class="">
      </div>
      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. 
    </blockquote>
    <br>
    Setting individual policies before a call to
    cmake_minimum_required() doesn't make sense given that it resets
    them all but you can set them after.<br>
    <br>
    The warnings are there so you as a developer of a project that
    conforms to CMake 2.8.8 know that the behavior will change as soon
    as you convert your project to 3.1.<br>
    You can get rid of the warnings by working around the if() ambiguity
    so that behavior before and after CMake 3.1 is identical or by
    requiring 3.1.<br>
    <br>
    If you do switch to requiring 3.1 make sure the new behavior works
    for you.<br>
    <br>
    Nils<br>
  </body>
</html>