summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ObjectLibrary/check_object_files.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/ObjectLibrary/check_object_files.cmake')
-rw-r--r--Tests/RunCMake/ObjectLibrary/check_object_files.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/ObjectLibrary/check_object_files.cmake b/Tests/RunCMake/ObjectLibrary/check_object_files.cmake
new file mode 100644
index 0000000..3c34229
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/check_object_files.cmake
@@ -0,0 +1,17 @@
+
+if (NOT TARGET_OBJECTS)
+ message(SEND_ERROR "Object not passed as -DTARGET_OBJECTS")
+endif()
+
+foreach(objlib_file IN LISTS objects)
+ message(STATUS "objlib_file: =${objlib_file}=")
+
+ set(file_exists False)
+ if (EXISTS "${objlib_file}")
+ set(file_exists True)
+ endif()
+
+ if (NOT file_exists)
+ message(SEND_ERROR "File \"${objlib_file}\" does not exist!${tried}")
+ endif()
+endforeach()