summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-21 15:58:10 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-21 15:59:38 (GMT)
commit28ef1081401fb62da98157083eae254502d350c0 (patch)
tree7a369fa9a22ff5554d19758be288cf4337dde4e3 /Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake
parentb6412b38ee7dbb7c2e2095e1d83260de7441c240 (diff)
parentbb6e95ca6d31829f8ed03512f447e8c02ea46c43 (diff)
downloadCMake-28ef1081401fb62da98157083eae254502d350c0.zip
CMake-28ef1081401fb62da98157083eae254502d350c0.tar.gz
CMake-28ef1081401fb62da98157083eae254502d350c0.tar.bz2
Merge topic 'source_group-tests'
bb6e95ca6d source_group: Improved generated filters tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3675
Diffstat (limited to 'Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake')
-rw-r--r--Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake30
1 files changed, 4 insertions, 26 deletions
diff --git a/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake b/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake
index c2a94bb..616f38b 100644
--- a/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake
+++ b/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake
@@ -4,30 +4,8 @@ if(NOT EXISTS "${vcFiltersFile}")
return()
endif()
-set(foundFileFilter 0)
-set(foundFilter 0)
file(STRINGS "${vcFiltersFile}" lines)
-foreach(line IN LISTS lines)
- if(line MATCHES "<Filter>CMakeListsSourceGroup</Filter>")
- set(rule "${CMAKE_MATCH_1}")
- if(foundFileFilter)
- set(RunCMake_TEST_FAILED "Multiple files listed with filter for CMakeListsSourceGroup.")
- return()
- endif()
- set(foundFileFilter 1)
- endif()
- if(line MATCHES "<Filter.*Include=\"CMakeListsSourceGroup\"")
- set(rule "${CMAKE_MATCH_1}")
- if(foundFilter)
- set(RunCMake_TEST_FAILED "Multiple copies of CMakeListsSourceGroup filter listed.")
- return()
- endif()
- set(foundFilter 1)
- endif()
-endforeach()
-if(NOT foundFileFilter)
- set(RunCMake_TEST_FAILED "File filter for CMakeListsSourceGroup not found.")
-endif()
-if(NOT foundFilter)
- set(RunCMake_TEST_FAILED "Filter CMakeListsSourceGroup not found.")
-endif()
+
+include(${RunCMake_TEST_SOURCE_DIR}/SourceGroupHelpers.cmake)
+
+find_source_group("${lines}" CMakeListsSourceGroup)