diff options
author | Brad King <brad.king@kitware.com> | 2022-03-08 21:02:03 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-03-08 21:02:15 (GMT) |
commit | ba695c87e16b7bdc3b1948bf3382d40585905da7 (patch) | |
tree | 760640e4c7e3c411beadf3bd49423347cb04618a /Tests/RunCMake | |
parent | 130c9889825f06dacb3453f6ee6ebc3b7e3d914a (diff) | |
parent | eca72dab8bdaaa3b2571c2c4e0f448ba07167d89 (diff) | |
download | CMake-ba695c87e16b7bdc3b1948bf3382d40585905da7.zip CMake-ba695c87e16b7bdc3b1948bf3382d40585905da7.tar.gz CMake-ba695c87e16b7bdc3b1948bf3382d40585905da7.tar.bz2 |
Merge topic 'test-cmp0125' into release-3.23
eca72dab8b Tests: Make RunCMake.CMP0125 robust to external filesystem content
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7049
Diffstat (limited to 'Tests/RunCMake')
4 files changed, 56 insertions, 56 deletions
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_file-Common.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_file-Common.cmake index a85978b..c2a8d33 100644 --- a/Tests/RunCMake/CMP0125/CMP0125-find_file-Common.cmake +++ b/Tests/RunCMake/CMP0125/CMP0125-find_file-Common.cmake @@ -1,16 +1,16 @@ -find_file(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_file(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_file(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_file(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_file(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_file(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_file(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_file(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_file(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_file(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_file(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_file(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) file(WRITE "${CMAKE_BINARY_DIR}/${FILE_NAME}" "") -find_file(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_file(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_file(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_file(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) message("RELATIVE_PATH=${RELATIVE_PATH}") message("RELATIVE_PATH_WITH_TYPE=${RELATIVE_PATH_WITH_TYPE}") @@ -32,14 +32,14 @@ set(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL /absolute_local) set(NOTFOUND_AND_LOCAL "${FILE_NAME}") set(NOTFOUND_WITH_TYPE_AND_LOCAL "${FILE_NAME}") -find_file(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_file(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_file(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_file(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_file(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_file(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_file(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_file(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_file(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_file(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_file(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_file(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) message("RELATIVE_PATH_AND_LOCAL=${RELATIVE_PATH_AND_LOCAL}") message("RELATIVE_PATH_WITH_TYPE_AND_LOCAL=${RELATIVE_PATH_WITH_TYPE_AND_LOCAL}") diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_library-Common.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_library-Common.cmake index d2bc006..54ebda9 100644 --- a/Tests/RunCMake/CMP0125/CMP0125-find_library-Common.cmake +++ b/Tests/RunCMake/CMP0125/CMP0125-find_library-Common.cmake @@ -1,17 +1,17 @@ -find_library(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_library(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_library(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_library(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_library(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_library(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_library(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_library(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_library(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_library(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_library(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_library(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) file(WRITE "${CMAKE_BINARY_DIR}/${FILE_NAME}" "") file(CHMOD "${CMAKE_BINARY_DIR}/${FILE_NAME}" PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE) -find_library(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_library(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_library(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_library(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) message("RELATIVE_PATH=${RELATIVE_PATH}") message("RELATIVE_PATH_WITH_TYPE=${RELATIVE_PATH_WITH_TYPE}") @@ -33,14 +33,14 @@ set(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL /absolute_local) set(NOTFOUND_AND_LOCAL "${FILE_NAME}") set(NOTFOUND_WITH_TYPE_AND_LOCAL "${FILE_NAME}") -find_library(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_library(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_library(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_library(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_library(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_library(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_library(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_library(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_library(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_library(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_library(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_library(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) message("RELATIVE_PATH_AND_LOCAL=${RELATIVE_PATH_AND_LOCAL}") message("RELATIVE_PATH_WITH_TYPE_AND_LOCAL=${RELATIVE_PATH_WITH_TYPE_AND_LOCAL}") diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake index 37680c2..193cdea 100644 --- a/Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake +++ b/Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake @@ -1,16 +1,16 @@ -find_path(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_path(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_path(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_path(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_path(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_path(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_path(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_path(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_path(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_path(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_path(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_path(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) file(WRITE "${CMAKE_BINARY_DIR}/${FILE_NAME}" "") -find_path(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_path(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_path(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_path(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) message("RELATIVE_PATH=${RELATIVE_PATH}") message("RELATIVE_PATH_WITH_TYPE=${RELATIVE_PATH_WITH_TYPE}") @@ -32,14 +32,14 @@ set(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL /absolute_local) set(NOTFOUND_AND_LOCAL "${FILE_NAME}") set(NOTFOUND_WITH_TYPE_AND_LOCAL "${FILE_NAME}") -find_path(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_path(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_path(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_path(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_path(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_path(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_path(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_path(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_path(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_path(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_path(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_path(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) message("RELATIVE_PATH_AND_LOCAL=${RELATIVE_PATH_AND_LOCAL}") message("RELATIVE_PATH_WITH_TYPE_AND_LOCAL=${RELATIVE_PATH_WITH_TYPE_AND_LOCAL}") diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_program-Common.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_program-Common.cmake index fee4c34..135d997 100644 --- a/Tests/RunCMake/CMP0125/CMP0125-find_program-Common.cmake +++ b/Tests/RunCMake/CMP0125/CMP0125-find_program-Common.cmake @@ -1,17 +1,17 @@ -find_program(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_program(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_program(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_program(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_program(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_program(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_program(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_program(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_program(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_program(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_program(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_program(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) file(WRITE "${CMAKE_BINARY_DIR}/${FILE_NAME}" "") file(CHMOD "${CMAKE_BINARY_DIR}/${FILE_NAME}" PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE) -find_program(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_program(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_program(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_program(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) message("RELATIVE_PATH=${RELATIVE_PATH}") message("RELATIVE_PATH_WITH_TYPE=${RELATIVE_PATH_WITH_TYPE}") @@ -33,14 +33,14 @@ set(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL /absolute_local) set(NOTFOUND_AND_LOCAL "${FILE_NAME}") set(NOTFOUND_WITH_TYPE_AND_LOCAL "${FILE_NAME}") -find_program(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_program(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_program(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_program(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_program(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_program(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_program(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_program(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) -find_program(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) -find_program(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH}) +find_program(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) +find_program(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH} NO_DEFAULT_PATH) message("RELATIVE_PATH_AND_LOCAL=${RELATIVE_PATH_AND_LOCAL}") message("RELATIVE_PATH_WITH_TYPE_AND_LOCAL=${RELATIVE_PATH_WITH_TYPE_AND_LOCAL}") |