【发布时间】:2015-06-06 20:51:40
【问题描述】:
我正在处理一个 [曾经] 支持 Autotools 和 Cmake 的项目。过去,我会:
cd project/build
...
../llvm/configure --enable-optimized --enable-cxx11 $OTHER_OPTIONS --prefix=/usr/local
make -j2
sudo make install
该项目已经放弃了对 Autotools 的支持,所以我现在必须使用 Cmake。使用 Cmake 进行配置似乎应该相对容易。
不幸的是,Mac OS X 缺少 Cmake 的手册页,所以我不能 RTFM。我发现的搜索结果讨论了如何构建 Cmake 包(以及包维护者会做的其他事情),而不是如何将其用作愚蠢的项目用户。
我尝试简单地使用 Cmake 代替 Configure,但它不起作用:
$ cd project/build
$ OTHER_OPTIONS=" --enable-libcpp"; cmake ../llvm --enable-optimized --enable-cxx11 "$OTHER_OPTIONS" --prefix=/usr/local
CMake Error: The source directory ".../clang-3.6/build/--prefix=/usr/local" does not exist.
为什么 Cmake 将配置选项视为目录 (--prefix=/usr/local)?
我如何配置和构建一个使用 Cmake 作为哑项目用户的项目?
【问题讨论】:
标签: configuration cmake