You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/RunCMake/if/IsDirectoryLong.cmake

11 lines
289 B

set(d "/long/path/to/directory")
foreach(i RANGE 11)
string(APPEND 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()