summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file/SIZE.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/file/SIZE.cmake')
-rw-r--r--Tests/RunCMake/file/SIZE.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/SIZE.cmake b/Tests/RunCMake/file/SIZE.cmake
new file mode 100644
index 0000000..4d9dbd2
--- /dev/null
+++ b/Tests/RunCMake/file/SIZE.cmake
@@ -0,0 +1,9 @@
+set(file "${CMAKE_CURRENT_BINARY_DIR}/a-test-file")
+
+file(WRITE "${file}" "test")
+
+file(SIZE "${file}" CALCULATED_SIZE)
+
+if (NOT CALCULATED_SIZE EQUAL 4)
+ message(FATAL_ERROR "Unexpected file size")
+endif()