Re: [CMake] Forcing location of binary directory in CMake

2009-03-26 Thread Carlson Daniel
Why not use out of source build? http://wiki.qgis.org/qgiswiki/Building_with_CMake //Daniel 2009/3/26 Michael Jackson > I would use something like the following: > > get_filename_component(buildParent ${CMAKE_CURRENT_BINARY_DIR} PATH) > if (NOT ${buildParent} STREQUAL ${${PROJECT_NAME}_SOURCE_

Re: [CMake] Forcing location of binary directory in CMake

2009-03-26 Thread Michael Jackson
I would use something like the following: get_filename_component(buildParent ${CMAKE_CURRENT_BINARY_DIR} PATH) if (NOT ${buildParent} STREQUAL ${${PROJECT_NAME}_SOURCE_DIR}) message(FATAL_ERROR "Wrong Build Directory") endif() Or something similar to that might work. ___

Re: [CMake] Forcing location of binary directory in CMake

2009-03-26 Thread Andreas Pakulat
On 26.03.09 14:16:27, Robert Dailey wrote: > Hi, > For various reasons I will not bother to mention here, I need to stipulate > the location of the binary directory. For example, if my source directory > is: > > C:\foo\bar > > My build directory *must* be here: > > C:\foo\bar\build > > The user

[CMake] Forcing location of binary directory in CMake

2009-03-26 Thread Robert Dailey
Hi, For various reasons I will not bother to mention here, I need to stipulate the location of the binary directory. For example, if my source directory is: C:\foo\bar My build directory *must* be here: C:\foo\bar\build The user should not have a choice in the matter. This is a requirement. Is