3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 22:33:48 +01:00
dft_tools/cmake/FindTriqsMacros.cmake

16 lines
624 B
CMake
Raw Normal View History

# add_all_subdirectories_with_cmakelist : include all subdirectory to current path
# which contains a CMakeLists.txt file...
# rational : automatize inclusion when projects are splitted & merged ....
macro (add_all_subdirectories_with_cmakelist)
SET( print_decal_sub_dir "${print_decal_sub_dir} ")
FILE(GLOB ALLSUBS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} */CMakeLists.txt)
foreach ( f ${ALLSUBS})
get_filename_component(d ${f} PATH)
#MESSAGE(STATUS "${print_decal_sub_dir}## Including subdirectory : ${d}")
add_subdirectory(${d})
endforeach ( f ${ALLSUBS})
endmacro (add_all_subdirectories_with_cmakelist)