diff --git a/template/CMakeLists.txt b/template/CMakeLists.txt index 2cd197a1..c934e6ca 100644 --- a/template/CMakeLists.txt +++ b/template/CMakeLists.txt @@ -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} )