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

Matt.Bolger at csiro.au Matt.Bolger at csiro.au
Tue Jun 10 19:39:48 EDT 2014


I raised an issue in the Qt bug tracker for this https://bugreports.qt-project.org/browse/QTBUG-39457 - everyone should go vote for it ☺

Matt

From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Andrew Maclean
Sent: Wednesday, 11 June 2014 9:20 AM
To: VTK Developers; vtk; cmake at cmake.org
Subject: [CMake] CMake 3.0, Qt5.3 and Policy CMP0043.

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.cmake.org/pipermail/cmake/attachments/20140610/6113c23d/attachment.html>


More information about the CMake mailing list