summaryrefslogtreecommitdiffstats
path: root/Tests/UseSWIG/SwigSrcOUTPUT_DIR/ValidateSupportFiles.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/UseSWIG/SwigSrcOUTPUT_DIR/ValidateSupportFiles.cmake')
-rw-r--r--Tests/UseSWIG/SwigSrcOUTPUT_DIR/ValidateSupportFiles.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/UseSWIG/SwigSrcOUTPUT_DIR/ValidateSupportFiles.cmake b/Tests/UseSWIG/SwigSrcOUTPUT_DIR/ValidateSupportFiles.cmake
new file mode 100644
index 0000000..20240ed
--- /dev/null
+++ b/Tests/UseSWIG/SwigSrcOUTPUT_DIR/ValidateSupportFiles.cmake
@@ -0,0 +1,17 @@
+
+foreach (support_dir IN LISTS SUPPORT_FILES_DIRECTORY)
+ file (GLOB_RECURSE files LIST_DIRECTORIES TRUE RELATIVE "${BASE_DIRECTORY}" "${support_dir}/*")
+ list (APPEND support_files ${files})
+endforeach()
+
+list(SORT support_files)
+
+if (OUTFILE_DIR)
+ set (expected_files "BarSupport/Bar.cs;BarSupport/BarPINVOKE.cs;BarSupport/Math.cs;FooSupport/Foo.cs;FooSupport/FooPINVOKE.cs;FooSupport/Math.cs")
+else()
+ set (expected_files "Bar/Bar.cs;Bar/BarPINVOKE.cs;Bar/Math.cs;Bar/barCSHARP_wrap.cxx;Foo/Foo.cs;Foo/FooPINVOKE.cs;Foo/Math.cs;Foo/fooCSHARP_wrap.cxx")
+endif()
+
+if (NOT support_files STREQUAL expected_files)
+ message (FATAL_ERROR "Support files not correctly collected.")
+endif()