summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-28 19:15:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-28 19:15:56 (GMT)
commitb78a68f98b0e5b0c8037cb2ef68232918cb2833e (patch)
treecd1d6cb5fdf1ce253f3f4cf469972b0dd02eb62e /Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
parent0842a3d030f1fc46554c174cf572fb9da7952373 (diff)
parentac6b18cd907392e4a6d5d76ac0f9e173a9cc7e32 (diff)
downloadCMake-b78a68f98b0e5b0c8037cb2ef68232918cb2833e.zip
CMake-b78a68f98b0e5b0c8037cb2ef68232918cb2833e.tar.gz
CMake-b78a68f98b0e5b0c8037cb2ef68232918cb2833e.tar.bz2
Merge topic 'csharp-out-of-source-groups'
ac6b18cd90 CSharp: Add support for source groups with out-of-source builds Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4374
Diffstat (limited to 'Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake')
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
new file mode 100644
index 0000000..3b5c70f
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
@@ -0,0 +1,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()