Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cmake 宏\u确保\u出\u源\u生成停止生成_Cmake - Fatal编程技术网

Cmake 宏\u确保\u出\u源\u生成停止生成

Cmake 宏\u确保\u出\u源\u生成停止生成,cmake,Cmake,我们的项目依赖于ifm3d作为子模块。编译现在失败了 CMake Error at dep/repo/dep/ifm3d/cmake/modules/MacroOutOfSourceBuild.cmake:10 (MESSAGE): Please build IFM3D out-of-source Call Stack (most recent call first): dep/repo/dep/ifm3d/CMakeLists.txt:12 (macro_ensure_out_of_s

我们的项目依赖于ifm3d作为子模块。编译现在失败了

CMake Error at dep/repo/dep/ifm3d/cmake/modules/MacroOutOfSourceBuild.cmake:10 (MESSAGE):
  Please build IFM3D out-of-source
Call Stack (most recent call first):
  dep/repo/dep/ifm3d/CMakeLists.txt:12 (macro_ensure_out_of_source_build)


-- Configuring incomplete, errors occurred!
See also "/home/me/repo/CMakeFiles/CMakeOutput.log".
See also "/home/me/repo/CMakeFiles/CMakeError.log".
宏似乎试图说服我从特定文件夹中编译。然而,我不知道如何解决这个问题


您必须创建一个文件夹,即所谓的构建目录,名称并不重要。输入它,调用
cmake
并运行make(或任何您使用的构建工具)

例如,当您位于项目的根目录中时

makedir build
cd build
cmake ..
make