[CMake] CMP0093 behaviour

James Turner james.turner at kdab.com
Mon Oct 7 06:02:08 EDT 2019


Hello,

I’m experiencing an odd problem where no matter how I set CMP0093, it seems to use the ‘NEW’ behaviour, breaking some other code relying on the OLD behaviour.

This is Cmake 3.15.4 from Homebrew, other people do report on other platforms do report the policy working for them. Here’s my code to set the policy, in the same place we set other policy options:

if(POLICY CMP0093)
     message(STATUS "Using old Boost version policy")
     cmake_policy(SET CMP0093 OLD)
endif()

The message is printed correctly, but after running find_package(Boost…), the value of Boost_VERSION is the new dotted syntax (eg 1.71.0) rather than the old, compatible syntax I need.

Is there anything special about this policy where I might have screwed this up? I can’t really imagine it’s a Homebrew packaging issue, but also don’t understand what else I could have gotten wrong syntactically.

Kind regards,
James


More information about the CMake mailing list