summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/if/IsDirectoryLong.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/if/IsDirectoryLong.cmake')
-rw-r--r--Tests/RunCMake/if/IsDirectoryLong.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/if/IsDirectoryLong.cmake b/Tests/RunCMake/if/IsDirectoryLong.cmake
new file mode 100644
index 000000000..0e93be744
--- /dev/null
+++ b/Tests/RunCMake/if/IsDirectoryLong.cmake
@@ -0,0 +1,10 @@
+set(d "/long/path/to/directory")
+foreach(i RANGE 11)
+ set(d "${d}${d}")
+endforeach()
+string(LENGTH "${d}" dl)
+if(IS_DIRECTORY "${d}/")
+ message(FATAL_ERROR "Directory should not exist!")
+else()
+ message(STATUS "Directory path with length ${dl} correctly does not exist.")
+endif()