2011/12/17 Renato Utsch <renatout...@gmail.com>: > Doing this checking of in-source and out-of-source is easy! > > if( "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}" ) > message( FATAL_ERROR > "Do not make an in-source build with this project." > ) > endif( "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}" )
Yes it is but it doesn't prevent your source tree to be cluttered with CMakeCache.txt etc... Thus the next try to build out-of-source will in fact try an in-source build, which usually puzzles the average user. You'll have to remove CMakeCache.txt from the source tree in order to make things work as you want again. Try yourself and read the previously mentioned bug report, you'll see what I mean. > > Ok, I will look the CMakeParseArguments module... thanks! Please do not drop the ML address -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- 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