IsDirectoryLong.cmake 289 B

12345678910
  1. set(d "/long/path/to/directory")
  2. foreach(i RANGE 11)
  3. string(APPEND d "${d}")
  4. endforeach()
  5. string(LENGTH "${d}" dl)
  6. if(IS_DIRECTORY "${d}/")
  7. message(FATAL_ERROR "Directory should not exist!")
  8. else()
  9. message(STATUS "Directory path with length ${dl} correctly does not exist.")
  10. endif()