[CMake] cmake policy CMP0022 error
Clinton Stimpson
clinton at elemtech.com
Wed Oct 23 15:34:21 EDT 2013
I have a target where I do this:
SET_TARGET_PROPERTIES(mytarget PROPERTIES LINK_INTERFACE_LIBRARIES "")
to hide 3rd party libraries from the link interface.
When I do
if(APPLE)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
endif()
I get an error at generate time.
This is different than my previous experiences with cmake policies. Based on
past experiences, I expected to see a warning if I had
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
but used CMake 2.8.12 which introduced CMP0022.
But in this case, I don't see a warning.
The error I get with
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
is:
CMake Error in .../CMakeLists.txt:
Target "mytarget" has policy CMP0022 enabled, but also has old-style
LINK_INTERFACE_LIBRARIES properties populated, but it was exported without
the EXPORT_LINK_INTERFACE_LIBRARIES to export the old-style properties
When I read the output from cmake --help-policy CMP0022, its not clear to me
why I'm getting the error.
--
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
More information about the CMake
mailing list