diff options
Diffstat (limited to 'Tests/RunCMake/CMP0125/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CMP0125/RunCMakeTest.cmake | 36 |
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}) |