Philip Schwartz wrote:
> Currently when setting CMP0015 to old, the warnings are still displayed.
> As the policy is only a warning policy at this time there is no breakage
> of the configure step other then a lot of unneeded warnings.

Use cmake_policy(GET) to check the policy value right before the call
to link_directories.  The code in question looks like this:

    switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0015))
      {
      case cmPolicies::WARN:
        e << policies->GetPolicyWarning(cmPolicies::CMP0015);
        this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, e.str());
      case cmPolicies::OLD:
        // OLD behavior does not convert
        break;
      ...
      }

so if it is warning then we can be fairly sure the command does not
see your setting.

Note that any call to cmake_minimum_required(VERSION ...) will reset
all policies to the defaults for the specified version.  If that comes
after your call to cmake_policy(SET) then it will erase your setting.

-Brad
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to