Chaging the output directory of CMake generated files -
my project has structure :
root |- src/ |- bin/ |- include/ |- cmakefiles/ |- cmakelists.txt
when run cmake
command generates files : cmakecache.txt
, cmake_install.cmake
there way send automatically in cmakefiles or delete afterwards ?
i want use cmake (not command line combo cmake -g"unix makefiles" && rm -f cmakecache.txt cmake_install.cmake
)
it better use out-of-source build tree.
create new directory build
:
root |- src/ |- bin/ |- include/ |- cmakefiles/ |- cmakelists.txt build
and run cmake
in build
directory:
cd build cmake ../root
all cmake generated files , build artifacts located in build tree , not pollute source directory.
it recommended way work cmake : http://www.cmake.org/wiki/cmake_faq#out-of-source_build_trees
Comments
Post a Comment