[CMake] Error when upgraded to 2.8.7 from 2.8.1

Alexander Neundorf a.neundorf-work at gmx.net
Thu Mar 14 13:55:59 EDT 2013


On Thursday 14 March 2013, newuserhere wrote:
> Hi,
> I am getting an error in CMAKE configuration after it was updated to 2.8.7.
> The line to which error is pointed :
> /find_package(PythonInterp)/
> 
> Well the error is as follows :
> 
> /CMake Warning (dev) at
> /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:86
> (INCLUDE):
>   File /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake
>   includes
>    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.
> Call Stack (most recent call first):
>   /usr/share/cmake-2.8/Modules/FindPythonInterp.cmake:63 (include)
>   sym/CMakeLists.txt:54 (find_package)
> This warning is for project developers.  Use -Wno-dev to suppress it.
> 
> CMake Error at
> /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:169
> (MESSAGE):
>   No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()
> Call Stack (most recent call first):
>   /usr/share/cmake-2.8/Modules/FindPythonInterp.cmake:64
> (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
>   sym/CMakeLists.txt:54 (find_package)
> /
> 
> Could someone help me in finding out how to solve the error.

This does not happen anymore in the upcoming 2.8.11 release.

The problem is that you have CMAKE_MODULE_PATH set, and 
sym/CMakeLists.txt
does a
find_package(PythonInterp)
which uses FindPythonInterp.cmake from cmake, which does
include(FindPackageHandleStandardArgs)
which it finds in cmake, which does
include(CMakeParseArguments)
which it now does not find from cmake, but from within your project, in 
cmake/modules/, and which does not have the same features as the 
FindPackageHandleStandardArgs.cmake expects.

So either use a most current cmake, or don't set CMAKE_MODULE_PATH, or update 
the copy of CMakeParseArguments.cmake in your project.

Alex





More information about the CMake mailing list