From 1b636b43d2bf4dca0332a2e2b36affa67fbe1e0b Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Mon, 11 May 2015 13:56:28 +0100 Subject: Add unit tests for ECMAddTests module. REVIEW: 123722 --- tests/ECMAddTests/check_files.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/ECMAddTests/check_files.cmake (limited to 'tests/ECMAddTests/check_files.cmake') diff --git a/tests/ECMAddTests/check_files.cmake b/tests/ECMAddTests/check_files.cmake new file mode 100644 index 00000000..fc6003c6 --- /dev/null +++ b/tests/ECMAddTests/check_files.cmake @@ -0,0 +1,15 @@ +set(i 0) +set(in_file_args FALSE) +while (i LESS CMAKE_ARGC) + if (in_file_args) + if (NOT EXISTS "${CMAKE_ARGV${i}}") + message(FATAL_ERROR "${CMAKE_ARGV${i}} does not exist") + endif() + elseif (CMAKE_ARGV${i} STREQUAL "-P") + # skip script name + math(EXPR i "${i} + 1") + set(in_file_args TRUE) + endif() + math(EXPR i "${i} + 1") +endwhile() + -- cgit v1.2.1