IsDirectoryLong.cmake 289 Bytes
Newer Older
Brad King's avatar
Brad King committed
1 2
set(d "/long/path/to/directory")
foreach(i RANGE 11)
Daniel Pfeifer's avatar
Daniel Pfeifer committed
3
  string(APPEND d "${d}")
Brad King's avatar
Brad King committed
4 5 6 7 8 9 10
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()