首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >试图在花栗鼠上运行cmake错误,如何修复cmake文件?

试图在花栗鼠上运行cmake错误,如何修复cmake文件?
EN

Stack Overflow用户
提问于 2015-12-28 06:26:00
回答 1查看 592关注 0票数 0

所以基本上,我试图在linux mint上构建花栗鼠物理库,它显然有一个cmake文件,我试图运行它,但是由于一些错误,它没有完成,输出是

代码语言:javascript
运行
复制
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输出文件中的错误

代码语言:javascript
运行
复制
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文件修好吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-28 07:22:17

您的CMake版本太老了。CMP0042是在CMake 2.8.12中引入的。

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34488656

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档