diff options
Diffstat (limited to 'Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake')
-rw-r--r-- | Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake b/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake index c82a66e..3a5d2e7 100644 --- a/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake +++ b/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake @@ -1,8 +1,9 @@ function(find_source_group LINES NAME) set(foundFileFilter 0) set(foundFilter 0) + string(REPLACE "\\" "\\\\" regexName "${NAME}") foreach(line IN LISTS LINES) - if(line MATCHES "<Filter>${NAME}</Filter>") + if(line MATCHES "<Filter>${regexName}</Filter>") if(foundFileFilter) set(RunCMake_TEST_FAILED "Multiple files listed with filter for ${NAME}." PARENT_SCOPE) set(FILTER_FOUND 0 PARENT_SCOPE) @@ -10,7 +11,7 @@ function(find_source_group LINES NAME) endif() set(foundFileFilter 1) endif() - if(line MATCHES "<Filter.*Include=\"${NAME}\"") + if(line MATCHES "<Filter.*Include=\"${regexName}\"") if(foundFilter) set(RunCMake_TEST_FAILED "Multiple copies of ${NAME} filter listed." PARENT_SCOPE) set(FILTER_FOUND 0 PARENT_SCOPE) |