summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
blob: 3b5c70f5509cb005a66c0bd752fd3f8d087f87de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
set(csProjFile "${RunCMake_TEST_BINARY_DIR}/VsCsharpSourceGroup.csproj")
if(NOT EXISTS "${csProjFile}")
  set(RunCMake_TEST_FAILED "Project file ${csProjFile} does not exist.")
  return()
endif()

file(STRINGS "${csProjFile}" lines)

include(${RunCMake_TEST_SOURCE_DIR}/VsCsharpSourceGroupHelpers.cmake)

set(SOURCE_GROUPS_TO_FIND
  "CSharpSourceGroup"
  "CSharpSourceGroup/nested"
  "Images"
)

foreach(GROUP_NAME IN LISTS ${SOURCE_GROUPS_TO_FIND})
  find_source_group("${lines}" ${GROUP_NAME})
  if(NOT ${SOURCE_GROUP_FOUND})
    return()
  endif()
endforeach()