Your build system would be independent where the output files are: the user can choose whatever build directory they want, and not be limited to _gnuDebug and _gnuRelease. (If they so chose, they could create each of those and configure a build into them, but they are just as likely to not do so. Actually, as I look at your info again, it looks like you're making lots of those _gnuRelease directories - that definitely looks like an in-source build.) If that's a policy you want to encourage in your organization, that's just fine, but to CMake, you should keep things relative to CMAKE_SOURCE_DIR/CMAKE_CURRENT_SOURCE_DIR and CMAKE_BINARY_DIR/CMAKE_CURRENT_BINARY_DIR. The general guideline is to never modify or generate anything into the _SOURCE_DIR - only into the _BINARY_DIR, that way you can get back to a clean source tree by just deleting the build directory. The makefiles generated by CMake will all be in the binary directory (and as a preemptive warning: don't commit the generated makefiles to source control, they are not machine-independent), so that's where you'd run make.
Hope this helps! Ryan On Fri, Sep 17, 2010 at 6:24 AM, David Aldrich <david.aldr...@eu.nec.com>wrote: > Hi Chris > > > No, you shouldn't have to, unless you're using in-source builds > > which is very strongly deprecated. Once you've gotten used to > > out-of-source builds you'll never want to go back. > > Ok, I'm trying to think of how this would work for us. > > The source for each of our libraries is in a separate subdirectory as you > would expect. The subdirectory structure is: > > Subdir ----- .cpp files > | > |-- Makefile > | > |-- _gnuDebug <=== .o and .a files for Debug build > | > |-- _gnuRelease <=== .o and .a files for Release build > > Would you call that an out-of-source build, or would you require the > Makefile to be in a 'Build' subdirectory below the source? > > Or, would you really like to see the build files somewhere to the side of > the source files? > > Best regards > > David > _______________________________________________ > 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 > -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
_______________________________________________ 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