summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake')
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake
new file mode 100644
index 0000000..bfa9a67
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake
@@ -0,0 +1,15 @@
+function(find_source_group LINES NAME)
+ set(foundSourceGroupLink 0)
+ foreach(line IN LISTS LINES)
+ if(line MATCHES "<Link>${NAME}</Link>")
+ set(foundSourceGroupLink 1)
+ endif()
+ endforeach()
+
+ if(NOT foundSourceGroupLink)
+ set(RunCMake_TEST_FAILED "Source group link for ${NAME} not found." PARENT_SCOPE)
+ set(SOURCE_GROUP_FOUND 0 PARENT_SCOPE)
+ return()
+ endif()
+ set(SOURCE_GROUP_FOUND 1 PARENT_SCOPE)
+endfunction()