CMake Error buildir"似乎不包含CMakeLists.txt



我尝试运行

cmake .

但遇到此错误:

In-source builds not allowed.  Please make a new directory (called 
a build
directory) and run CMake from there.  You may need to remove
CMakeCache.txt.

我按照指示做过,但有一个错误,说明:

"buildir" does not appear to contain CMakeLists.txt.

您需要在build Directory 中运行cmake,并使用源目录的参数

示例:

$ cd /path/to/example-0.0.1
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_FLAGS=VALUES # etc.

最新更新