From b2d474042314f5b3afefd0d08a4cc39ffdc1f5a2 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 13 Apr 2013 16:34:10 -0500 Subject: [PATCH] better file globbing when doing an "in tree build" --- template/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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} )