1 file(GLOB Eigen_src_subdirectories "*") 2 escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 3 foreach(f ${Eigen_src_subdirectories}) 4 if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" ) 5 add_subdirectory(${f}) 6 endif() 7 endforeach() 8