diff options
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/file/REAL_PATH.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/REAL_PATH.cmake b/Tests/RunCMake/file/REAL_PATH.cmake index 0b5d3c0..9c5d4ea 100644 --- a/Tests/RunCMake/file/REAL_PATH.cmake +++ b/Tests/RunCMake/file/REAL_PATH.cmake @@ -34,3 +34,19 @@ file(REAL_PATH "~/test.txt" real_path EXPAND_TILDE) if (NOT real_path STREQUAL "${HOME_DIR}/test.txt") message(SEND_ERROR "real path is \"${real_path}\", should be \"${HOME_DIR}/test.txt\"") endif() + +if (WIN32) + cmake_policy(SET CMP0139 NEW) + + set(in "${CMAKE_CURRENT_BINARY_DIR}/AbC.TxT") + + file(REMOVE "${in}") + file(TOUCH "${in}") + + string(TOLOWER "${in}" low) + file(REAL_PATH "${low}" out) + + if(NOT "${out}" PATH_EQUAL "${in}") + message(SEND_ERROR "real path is \"${out}\", should be \"${in}\"") + endif() +endif() |