From: Miguel A. Figueroa-V. <mi...@ie...> - 2009-03-20 22:27:07
|
Recently, we were discussing the idea of restructuring things in vxl so that one could do partial checkouts easily, so that checkouts are faster if I only need core, fore example. Right now, I am doing precisely this. I'm only checking out: core, mvl, and vpgl. It doesn't build, of course. One major problem is that SUBDIRS are called for directories that are not there. I have solved this by adding the following function to the vxl_utils.cmake. FUNCTION(ADD_SUBDIRECTORY_IF_EXISTS) FOREACH(directory ${ARGV}) IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${directory}/CMakeLists.txt) ADD_SUBDIRECTORY(${directory}) ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${directory}/CMakeLists.txt) ENDFOREACH(directory) ENDFUNCTION(ADD_SUBDIRECTORY_IF_EXISTS) Now I can call: ADD_SUBDIRECTORY_IF_EXISTS(mul) ADD_SUBDIRECTORY_IF_EXISTS(gel) ADD_SUBDIRECTORY_IF_EXISTS(brl) ... If nobody objects I'll commit this change. Further restructuring to enable partial checkouts still needs to be done, but I'll leave that to the more adventurous type. :) --Miguel |