我有以下琐碎的 CMakeLists.txt(FreeBSD 9.1,CMake 2.8.11.2):
project(temp_proj CXX)
message(${CMAKE_BINARY_DIR})
message(${CMAKE_SOURCE_DIR})
该文件位于/root/trunk/temp
. 由于我想执行源外构建,因此我创建了一个同级目录并从那里temp2
调用:cmake
root@:/root/trunk # mkdir temp2
root@:/root/trunk # cd temp2
root@:/root/trunk/temp2 # cmake ../temp
/root/trunk/temp
/root/trunk/temp
-- Configuring done
-- Generating done
-- Build files have been written to: /root/trunk/temp
怎么来的CMAKE_BINARY_DIR
和CMAKE_SOURCE_DIR
一样的?我究竟做错了什么?