2020-02-01 23:06:01 +01:00
|
|
|
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"
|
|
|
|
"Generated"
|
|
|
|
"SourcesPrefix"
|
|
|
|
"SourcesPrefix\\PrefixedNested"
|
|
|
|
)
|
|
|
|
|
2022-09-13 21:35:23 +02:00
|
|
|
foreach(GROUP_NAME IN LISTS SOURCE_GROUPS_TO_FIND)
|
2020-02-01 23:06:01 +01:00
|
|
|
find_source_group("${lines}" ${GROUP_NAME})
|
2022-09-13 21:35:23 +02:00
|
|
|
if(NOT FILTER_FOUND)
|
2020-02-01 23:06:01 +01:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
endforeach()
|