CMake 2.8 does in-source-builds although I ask for out-of-source. Why?
I call CMake 2.8 from an empty bin directory to do an out-of-source build:
> make ../svn/trunk/projekt/CMakeList.txt
but instead of generating the makefiles in place, CMake puts them in开发者_开发知识库to the source tree.
The CMake FAQ says that in this case you should look for CMakeCache.txt
files in the source tree that trigger in-source-builds, but there are none.
Explicitly setting the binary directory doesn't work neither:
> make -DCMAKE_BINARY_DIR=`pwd` ../svn/trunk/projekt/CMakeList.txt
Any ideas what I can try else?
I guess you mean cmake ../svn/trunk/projekt/CMakeList.txt
rather than make ...
? That's the wrong way to do it. You need to specify the path to the top level of the CMake project not the CMakeLists.txt file itself, so after having removed the CMakeCache.txt files you should run:
cmake ../svn/trunk/projekt
精彩评论