7378792b49
Add a RunCMake.if test to cover if() command behavior. Start with a test for IS_DIRECTORY cases with an existing directory and a long path, both with a trailing slash.
11 lines
283 B
CMake
11 lines
283 B
CMake
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()
|