ubuntu cmake..中出现Could not find cmake module file Error required internal CMake variable not set,的问题

在Ubuntu上使用CMake构建一个简单的HelloWorld工程时,遇到'Could not find cmake module file'错误。尝试了通过yum安装CMake和解决版本问题,但问题仍未解决。最终发现错误源头在于CMakeLists.txt文件中project()命令后不应有空格,移除空格后,CMake配置成功。
摘要由CSDN通过智能技术生成

ubuntu cmake…中出现的问题

在写一个helloworld的小工程,然后cmakelists如下

cmake_minimum_required( VERSION 2.8)
project (hello world)
add_executable(helloworld main.cpp)

执行cmake…
结果出现报错

CMake Error: Could not find cmake module file: CMakeDetermineworldCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_world_COMPILER_ENV_VAR
CMake Error
  • 19
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值