[CMake] How to use CMAKE_POLICY?

Marcel Loose loose at astron.nl
Thu Dec 13 06:31:18 EST 2012


Hi all,

I'm trying to figure out how to use the CMAKE_POLICY() command. I want 
to get rid of the warning on CMP0017. I've strategically placed 
"cmake_policy(PUSH)", "cmake_policy(SET CMP0017 OLD)", and 
"cmake_policy(POP)" which solves the problem when configuring with CMake 
2.8.9.

However, our project also needs to be compatible with CMake 2.6.2. The 
problem is that this older CMake now bails out with an error message:

CMake Error at CMake/FindLAPACK.cmake:44 (cmake_policy):
   Policy "CMP0017" is not known to this version of CMake.

This sounds like a catch-22. I've fixed the warning for the new CMake, 
but get an error in return for the old CMake. What am I doing wrong??

Best regards,
Marcel Loose.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: loose.vcf
Type: text/x-vcard
Size: 292 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121213/a93abcf1/attachment.vcf>


More information about the CMake mailing list