diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2022-06-03 10:42:41 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-06-03 17:31:36 (GMT) |
commit | be4b9e10afaae750ad184ce1b34d6cb2c3d7fd33 (patch) | |
tree | 1c88a4586bb77f93be8e9bf1ddd43cbcad1f4bbe /Tests/RunCMake/CMP0139/CMP0139-NEW.cmake | |
parent | 0aa0b8e146ea8d1dc50b4c045360abd57c3643e4 (diff) | |
download | CMake-be4b9e10afaae750ad184ce1b34d6cb2c3d7fd33.zip CMake-be4b9e10afaae750ad184ce1b34d6cb2c3d7fd33.tar.gz CMake-be4b9e10afaae750ad184ce1b34d6cb2c3d7fd33.tar.bz2 |
if command: Add PATH_EQUAL operator
Diffstat (limited to 'Tests/RunCMake/CMP0139/CMP0139-NEW.cmake')
-rw-r--r-- | Tests/RunCMake/CMP0139/CMP0139-NEW.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0139/CMP0139-NEW.cmake b/Tests/RunCMake/CMP0139/CMP0139-NEW.cmake new file mode 100644 index 0000000..8144696 --- /dev/null +++ b/Tests/RunCMake/CMP0139/CMP0139-NEW.cmake @@ -0,0 +1,25 @@ +cmake_policy(SET CMP0139 NEW) + + +set(path "a///b/c") +if (NOT path PATH_EQUAL "a/b/c") + message(SEND_ERROR "if(PATH_EQUAL): '${path}' not equal to 'a/b/c'") +endif() +set(path2 "a/b/c") +if (NOT path PATH_EQUAL path2) + message(SEND_ERROR "if(PATH_EQUAL): '${path}' not equal to '${path2}'") +endif() + +set (path "a/b/d/../c") +if (path PATH_EQUAL "a/b/c") + message(SEND_ERROR "if(PATH_EQUAL): '${path}' equal to 'a/b/c'") +endif() +set(path2 "a/b/c") +if ("a/b/d/../c" PATH_EQUAL path2) + message(SEND_ERROR "if(PATH_EQUAL): 'a/b/d/../c' equal to '${path2}'") +endif() + +cmake_path(NORMAL_PATH path) +if (NOT path PATH_EQUAL "a/b/c") + message(SEND_ERROR "if(PATH_EQUAL): '${path}' not equal to 'a/b/c'") +endif() |