better file globbing when doing an "in tree build"

This commit is contained in:
Dick Hollenbeck 2013-04-13 16:34:10 -05:00
parent a6a1ab5c27
commit b2d4740423

View file

@ -6,8 +6,11 @@ file( GLOB template_lst RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
# don't include CMakeLists.txt or CMakeLists.txt~ which could be in the GLOB list
string( REGEX REPLACE "CMakeLists.txt~*;?" "" template_lst "${template_lst}" )
#message( template_lst:${template_lst} )
# guard against an in tree "build"
string( REGEX REPLACE "CMakeFiles/[^;]+;?" "" template_lst "${template_lst}" )
#message( template_lst:${template_lst} )
foreach( tpl ${template_lst} )
#message( tpl:${tpl} )