As @Fraser suggested, the issue occurred because of CMakeCache.txt
file, which was left in /root/trunk/temp
.
Question
I have the following trivial CMakeLists.txt (FreeBSD 9.1, CMake 2.8.11.2):
project(temp_proj CXX)
message(${CMAKE_BINARY_DIR})
message(${CMAKE_SOURCE_DIR})
This file is located in /root/trunk/temp
. Since I want to perform an out-of-source build, I create a sibling directory temp2
and invoke cmake
from there:
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
How comes CMAKE_BINARY_DIR
and CMAKE_SOURCE_DIR
are the same?
What am I doing wrong?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow