Simple test output - CMake Error: The source directory does not exist

Simple test output - CMake Error: The source directory does not exist

当我在 Clion 中创建新项目时,cmake 找不到 CMakeTmp 目录。

运行 构建命令:/usr/bin/cmake cmTC_df723/fast && 没有那个文件或目录

OS:Linux 薄荷 19(Ubuntu 基础)

我试过:

错误输出:

/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/usr/bin/cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/gcc -G "CodeBlocks - Unix Makefiles" /home/sacha/CLionProjects/testProject
-- The C compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/gcc
CMake Error: Generator: execution of make failed. Make command was: /usr/bin/cmake cmTC_df723/fast && 
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/local/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

   "/usr/bin/gcc"

 is not able to compile a simple test program.

 It fails with the following output:

 Change Dir: /home/sacha/CLionProjects/testProject/cmake-build-release-system/CMakeFiles/CMakeTmp

 Run Build Command(s):/usr/bin/cmake cmTC_df723/fast && No such file or directory
Generator: execution of make failed. Make command was: /usr/bin/cmake cmTC_df723/fast && 

感谢任何帮助或指示,谢谢!

错误信息

CMake Error: Generator: execution of make failed.

信号,CMake 设置或其generator有问题


在给定的情况下,您还有其他消息

Make command was: /usr/bin/cmake cmTC_df723/fast &&

这意味着 cmake 作为 Make 命令是 运行。

这是错误的:cmakemake 命令不可互换。

你会检查第一个命令行,你会找到问题的根源:

-DCMAKE_MAKE_PROGRAM=/usr/bin/cmake

确切地说,它为 Make 命令设置了 cmake 可执行文件。您需要修复该行(例如在 CLion 设置中)。