diff options
author | Mateusz Janek <stryku2393@gmail.com> | 2019-08-08 19:39:52 (GMT) |
---|---|---|
committer | Mateusz Janek <stryku2393@gmail.com> | 2019-08-16 12:55:47 (GMT) |
commit | bb6e95ca6d31829f8ed03512f447e8c02ea46c43 (patch) | |
tree | 7ccd6822d08c93a0b97232ae914f89b277f4ee0e /Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake | |
parent | 6f1781c63ad58c3c84987dce7eee36668ed2ba57 (diff) | |
download | CMake-bb6e95ca6d31829f8ed03512f447e8c02ea46c43.zip CMake-bb6e95ca6d31829f8ed03512f447e8c02ea46c43.tar.gz CMake-bb6e95ca6d31829f8ed03512f447e8c02ea46c43.tar.bz2 |
source_group: Improved generated filters tests
Diffstat (limited to 'Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake')
-rw-r--r-- | Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake b/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake new file mode 100644 index 0000000..655120a --- /dev/null +++ b/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake @@ -0,0 +1,25 @@ +cmake_policy(SET CMP0011 NEW) + +set(vcFiltersFile "${RunCMake_TEST_BINARY_DIR}/SourceGroupTree.vcxproj.filters") +if(NOT EXISTS "${vcFiltersFile}") + set(RunCMake_TEST_FAILED "Filters file ${vcFiltersFile} does not exist.") + return() +endif() + +file(STRINGS "${vcFiltersFile}" lines) + +include(${RunCMake_TEST_SOURCE_DIR}/SourceGroupHelpers.cmake) + +set(SOURCE_GROUPS_TO_FIND + "Dir" + "Dir\\DirNested" + "SourcesPrefix" + "SourcesPrefix\\PrefixedNested" +) + +foreach(GROUP_NAME IN LISTS ${SOURCE_GROUPS_TO_FIND}) + find_source_group("${lines}" ${GROUP_NAME}) + if(NOT ${FILTER_FOUND}) + return() + endif() +endforeach() |