Review Request: only install CMakeParseArguments.cmake for cmake versions that do not have it

Alexander Neundorf neundorf at
Sun Oct 16 13:15:29 BST 2011

On Sunday 16 October 2011, Ralf Jung wrote:
> Hi,
> > > The problem is that this results in a warning about CMake files being
> > > overridden when running cmake for kde-workspace.
> > 
> > Can you post the exact warning message here, please ?
> Sure, here it is:
> CMake Warning (dev) at
> /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:86
> (INCLUDE): File
> /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake includes
> /opt/kde/share/apps/cmake/modules/CMakeParseArguments.cmake (found via
> CMAKE_MODULE_PATH) which shadows
>   /usr/share/cmake-2.8/Modules/CMakeParseArguments.cmake.  This may cause
>   errors later on .
>   Policy CMP0017 is not set: Prefer files from the CMake module directory
>   when including from there.  Run "cmake --help-policy CMP0017" for policy
>   details.  Use the cmake_policy command to set the policy and suppress
> this warning.

That's the problem.
CMP0017 should be set to NEW, and it is set to NEW in FindKDE4Internal.cmake.
So we need to find out why it is not set in this case.

> Call Stack (most recent call first):
>   /usr/share/cmake-2.8/Modules/FindThreads.cmake:156 (INCLUDE)
>   /opt/kde/share/apps/cmake/modules/Qt4ConfigDependentSettings.cmake:32
>   /opt/kde/share/apps/cmake/modules/FindQt4.cmake:1230 (INCLUDE)
>   libs/kephal/tests/CMakeLists.txt:3 (FIND_PACKAGE)
> This warning is for project developers.  Use -Wno-dev to suppress it.
> Of course I could just ignore and live with it - it's kind of asking for
> trouble however, and it stuck out while I looked for cmake issues on my
> system, so I wanted to get rid of it. I only used cmake for much smaller
> projects so far though ;-)
> > Instead we'll require cmake 2.8.6 (or 2.8.7) in the not too far future.
> > Then the file can be removed and the warning goes away.
> Debian testing and unstable as well as the current Ubuntu are still at
> 2.8.5, so please don't go ahead too fast.

We haven't been too fast in the past, I don't plan to change that in the 
future :-)


More information about the kde-core-devel mailing list