command line cmake (2.6.4) is always putting the generated build files under the current working directory from which cmake is executed, regardless of the value of CMAKE_BINARY_DIR. I have this directory tree; the names are symbolic, not absolute: parent (current working dir) | | top-level-cmake (project root contains top-level CMakeLists.txt)
I execute this command from within parent: cmake.exe -G "Visual Studio 8 2005" \ -C "top-level-cmake\init_cache.txt" top-level-cmake The file "init_cache.txt" contains the command: set (CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}/top-level-cmake" CACHE STRING "" FORCE) The value of CMAKE_BINARY_DIR before the set command is 'parent' The value of CMAKE_BINARY_DIR after the set command is 'parent/top-level-cmake' cmake executes and finishes with the output: -- Build files have been written to: parent I have also tried setting the values for CMAKE_SOURCE_DIR, PROJECT_SOURCE_DIR, PROJECT_BINARY_DIR in various combinations, but with no effect. I have read the 2.6 manpage, the cmake wiki and several mailing list postings, but I have not found a solution to this problem. This is important to us because we want to evolve our workflow so that cmake is executed from within another build script. Thanks, Shane Voisard _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake