试图在Chipmunk上运行cmake错误,如何修复cmake文件?

时间:2015-12-28 06:26:01

标签: cmake chipmunk

所以基本上我正在尝试在linux mint上构建Chipmunk物理库,它显然有一个cmake文件,我试图运行它并没有因为一些错误而完成,输出是

cmake ..
CMake Error at CMakeLists.txt:3 (cmake_policy):
  Policy "CMP0042" is not known to this version of CMake.


-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Configuring Chipmunk2D version 7.0.1
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Configuring incomplete, errors occurred!
See also "/home/dev/Downloads/Chipmunk2D-master/build/CMakeFiles/CMakeOutput.log".

好吧,我发现了CMakeError输出文件中的错误

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/cc 
Build flags: 
Id flags: 

The output was:
No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/cc 
Build flags: 
Id flags: -c

The output was:
No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/cc 
Build flags: 
Id flags: -Aa

The output was:
No such file or directory


Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/bin/c++ 
Build flags: 
Id flags: 

The output was:
No such file or directory


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/bin/c++ 
Build flags: 
Id flags: -c

The output was:
No such file or directory


Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":

任何想法如何修复cmake文件?

1 个答案:

答案 0 :(得分:0)

你的CMake版本太旧了。 CMP0042在CMake 2.8.12中引入。

您可以尝试删除CMakeLists.txt中的行:3,它应该是make_policy(CMP0042)。但不能保证其他部分能按预期工作。