【发布时间】:2018-09-05 18:38:49
【问题描述】:
将 cmake 更新到 3.12.1 版后出现错误
CMake Error at /usr/local/share/cmake-3.12/Modules/CMakeDetermineSystem.cmake:174 (file):
file attempted to write a file:
/home/wow/TrinityCore/CMakeFiles/CMakeOutput.log into a source directory.
Call Stack (most recent call first):
CMakeLists.txt:19 (project)
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make 已安装
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
g++ 也是。 Ubuntu 版本 14.04.5
有什么帮助或想法吗?
谢谢!
【问题讨论】:
-
您是否删除了构建目录并再次运行 cmake?
-
是的,但同样的错误
-
第一个错误 - “文件试图写入文件:” - 看起来很可疑。在
project()调用之前显示您的代码。 -
@Tsyvarev 我在哪里可以找到这个?我以前从未使用过 cmake……这是 TrinityCore Projekt
-
我的水晶球说您设置了
CMAKE_DISABLE_IN_SOURCE_BUILD和/或CMAKE_DISABLE_SOURCE_CHANGES,然后尝试进行源内构建。也就是说,从项目的根目录中,你刚刚写了cmake .。创建一个build子目录并在其中运行cmake。对于一个体面的项目结构(它仍然是一个 WIP),请参阅github.com/vector-of-bool/vector-of-bool.github.io/blob/master/…
标签: linux ubuntu cmake trinitycore