summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/if/IsDirectoryLong.cmake
blob: 41f1818debac22323fa51fd6806b6b441046f618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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()
if(IS_DIRECTORY "")
  message(FATAL_ERROR "IS_DIRECTORY \"\" should not exist")
endif()