Improves the filter for hidden files in "Eigen" and "Eigen/src".

This generic solution prevent cmake from having an error .svn folders when the source folder is under subversion.
This commit is contained in:
Frederic Gosselin
2010-11-22 10:47:07 -05:00
parent 5a65d7970a
commit 4c5932f8f5
3 changed files with 28 additions and 2 deletions

View File

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