gpt4 book ai didi

linux - 更新后的 Ubuntu cmake 错误

转载 作者:行者123 更新时间:2023-12-04 18:29:49 24 4
gpt4 key购买 nike

将 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!

制作已安装
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

任何帮助或想法?

谢谢!

最佳答案

正如评论中已经指出的那样,消息

file attempted to write a file ... into a source directory
CMAKE_DISABLE_SOURCE_CHANGES 的结果在项目的 CMakeLists.txt 中设置的变量.此设置激活检查,CMake 项目不会在源目录下创建任何文件。 (此变量设置的更精确描述见 that answer)。
通常设置 CMAKE_DISABLE_SOURCE_CHANGES变量伴随设置 CMAKE_DISABLE_IN_SOURCE_BUILD变量,字面意思:
该项目不应该在源代码中构建。
解决方案是构建项目 外源 ,在与源目录不同的构建目录中。
例如。那样:
cd <project-dir>
mkdir build
cd build
cmake ..

关于linux - 更新后的 Ubuntu cmake 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52191556/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com