所以基本上,我试图在linux mint上构建花栗鼠物理库,它显然有一个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文件修好吗?
发布于 2015-12-28 07:22:17
您的CMake版本太老了。CMP0042是在CMake 2.8.12中引入的。
您可以尝试删除CMakeLists.txt:3中的行,它应该是make_policy(CMP0042)。但不能保证其他部分将如预期的那样工作。
https://stackoverflow.com/questions/34488656
复制相似问题