summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0125/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-28 17:45:04 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-28 17:45:04 (GMT)
commit4c33b4e3b10109288d59d7cd17853f814754b024 (patch)
treea379c917e1fe9e678ad2b2a6a183569d1c91c66d /Tests/RunCMake/CMP0125/RunCMakeTest.cmake
parent59d9fa713158610b6183b214841d0f272ee6f900 (diff)
parentdd6fd62615ef816f5cbdbd8cd5f827a5cc360464 (diff)
downloadCMake-4c33b4e3b10109288d59d7cd17853f814754b024.zip
CMake-4c33b4e3b10109288d59d7cd17853f814754b024.tar.gz
CMake-4c33b4e3b10109288d59d7cd17853f814754b024.tar.bz2
Merge branch 'master' into ci-msvc-14.29-16.10
Diffstat (limited to 'Tests/RunCMake/CMP0125/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CMP0125/RunCMakeTest.cmake36
1 files changed, 36 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0125/RunCMakeTest.cmake b/Tests/RunCMake/CMP0125/RunCMakeTest.cmake
new file mode 100644
index 0000000..56d4c86
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/RunCMakeTest.cmake
@@ -0,0 +1,36 @@
+include(RunCMake)
+
+file(WRITE "${RunCMake_BINARY_DIR}/file.txt" "")
+file(CHMOD "${RunCMake_BINARY_DIR}/file.txt" PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
+
+set(options -DRELATIVE_PATH=relative -DABSOLUTE_PATH=/absolute
+ -DRELATIVE_PATH_WITH_TYPE:PATH=relative -DABSOLUTE_PATH_WITH_TYPE:PATH=/absolute
+ -DNOTFOUND_PATH=NOTFOUND -DNOTFOUND_PATH_WITH_TYPE:PATH=NOTFOUND
+ -DFILE_NAME=file2.txt -DFILE_NAME_WITH_TYPE:PATH=file2.txt
+ -DSEARCH_NAME=file.txt "-DSEARCH_PATH=${RunCMake_BINARY_DIR}"
+ -DRELATIVE_PATH_AND_LOCAL=relative -DABSOLUTE_PATH_AND_LOCAL=/absolute
+ -DRELATIVE_PATH_WITH_TYPE_AND_LOCAL:PATH=relative -DABSOLUTE_PATH_WITH_TYPE_AND_LOCAL:PATH=/absolute
+ -DNOTFOUND_PATH_AND_LOCAL=NOTFOUND -DNOTFOUND_PATH_WITH_TYPE_AND_LOCAL:PATH=NOTFOUND
+ -DFILE_NAME=file2.txt -DFILE_NAME_WITH_TYPE:PATH=file2.txt
+ -DSEARCH_NAME=file.txt "-DSEARCH_PATH=${RunCMake_BINARY_DIR}")
+
+run_cmake_with_options(CMP0125-find_file-OLD ${options})
+run_cmake_with_options(CMP0125-find_file-NEW ${options})
+run_cmake_with_options(CMP0125-find_path-OLD ${options})
+run_cmake_with_options(CMP0125-find_path-NEW ${options})
+run_cmake_with_options(CMP0125-find_program-OLD ${options})
+run_cmake_with_options(CMP0125-find_program-NEW ${options})
+
+
+file(WRITE "${RunCMake_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}file${CMAKE_SHARED_LIBRARY_SUFFIX}" "")
+file(CHMOD "${RunCMake_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}file${CMAKE_SHARED_LIBRARY_SUFFIX}" PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
+
+set(options -DRELATIVE_PATH=relative -DABSOLUTE_PATH=/absolute
+ -DRELATIVE_PATH_WITH_TYPE:PATH=relative -DABSOLUTE_PATH_WITH_TYPE:PATH=/absolute
+ -DNOTFOUND_PATH=NOTFOUND -DNOTFOUND_PATH_WITH_TYPE:PATH=NOTFOUND
+ -DFILE_NAME=${CMAKE_SHARED_LIBRARY_PREFIX}file2${CMAKE_SHARED_LIBRARY_SUFFIX}
+ -DFILE_NAME_WITH_TYPE:PATH=${CMAKE_SHARED_LIBRARY_PREFIX}file2${CMAKE_SHARED_LIBRARY_SUFFIX}
+ -DSEARCH_NAME=file "-DSEARCH_PATH=${RunCMake_BINARY_DIR}")
+
+run_cmake_with_options(CMP0125-find_library-OLD ${options})
+run_cmake_with_options(CMP0125-find_library-NEW ${options})