Why not use out of source build?<br><br><a href="http://wiki.qgis.org/qgiswiki/Building_with_CMake">http://wiki.qgis.org/qgiswiki/Building_with_CMake</a><br><br>//Daniel<br><br><div class="gmail_quote">2009/3/26 Michael Jackson <span dir="ltr">&lt;<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I would use something like the following:<br>
<br>
get_filename_component(buildParent ${CMAKE_CURRENT_BINARY_DIR} PATH)<br>
if (NOT ${buildParent} STREQUAL ${${PROJECT_NAME}_SOURCE_DIR})<br>
        message(FATAL_ERROR &quot;Wrong Build Directory&quot;)<br>
endif()<br>
<br>
Or something similar to that might work.<br>
<br>
_________________________________________________________<br>
Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer                  Dayton, Ohio<br>
<br>
<br>
<br>
On Mar 26, 2009, at 3:16 PM, Robert Dailey wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
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:<br>
<br>
C:\foo\bar<br>
<br>
My build directory *must* be here:<br>
<br>
C:\foo\bar\build<br>
<br>
The user should not have a choice in the matter. This is a requirement. Is there a way to enforce this?<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>