[vtkusers] CMake 3.0, Qt5.3 and Policy CMP0043.

Andrew Maclean andrew.amaclean at gmail.com
Tue Jun 10 19:19:53 EDT 2014


Hi All,
Just a quick note about Policy CMP0043.

When using CMake 3.0 and Qt5.3 these two files will generate the CMake
Warning:
"Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties."

$QTDIR/lib/cmake/Qt5Core/Qt5CoreMacros.cmake
$QTDIR/../Src/qtbase/src/corelib/Qt5CoreMacros.cmake

The lines that do this are:
$QTDIR/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:
 set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE
QT_NO_DEBUG)
$QTDIR/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:
 set_property(TARGET ${_target} APPEND PROPERTY
COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
$QTDIR/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:
 set_property(TARGET ${_target} APPEND PROPERTY
COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
$QTDIR/../Src/qtbase/src/corelib/Qt5CoreMacros.cmake:
 set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE
QT_NO_DEBUG)
$QTDIR/../Src/qtbase/src/corelib/Qt5CoreMacros.cmake:
 set_property(TARGET ${_target} APPEND PROPERTY
COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
$QTDIR/../Src/qtbase/src/corelib/Qt5CoreMacros.cmake:
 set_property(TARGET ${_target} APPEND PROPERTY
COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)

So if you have not set COMPILE_DEFINITIONS_<Config> anywhere in your CMake
configuration files, then this is the most likely source of the warnings.

In windows replace $QTDIR with $QTDIR$ where QTDIR is the path to the QT
binaries.

Andrew

-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140611/d3cad302/attachment.html>


More information about the vtkusers mailing list