You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake

52 lines
2.4 KiB

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} 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} 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} 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}")
message("ABSOLUTE_PATH=${ABSOLUTE_PATH}")
message("ABSOLUTE_PATH_WITH_TYPE=${ABSOLUTE_PATH_WITH_TYPE}")
message("NOTFOUND_PATH=${NOTFOUND_PATH}")
message("NOTFOUND_PATH_WITH_TYPE=${NOTFOUND_PATH_WITH_TYPE}")
message("FILE_NAME=${FILE_NAME}")
message("FILE_NAME_WITH_TYPE=${FILE_NAME_WITH_TYPE}")
set(RELATIVE_PATH_AND_LOCAL relative_local)
set(RELATIVE_PATH_WITH_TYPE_AND_LOCAL relative_local)
set(ABSOLUTE_PATH_AND_LOCAL /absolute_local)
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} 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} 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} 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}")
message("ABSOLUTE_PATH_AND_LOCAL=${ABSOLUTE_PATH_AND_LOCAL}")
message("ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=${ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL}")
message("NOTFOUND_PATH_AND_LOCAL=${NOTFOUND_PATH_AND_LOCAL}")
message("NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=${NOTFOUND_PATH_WITH_TYPE_AND_LOCAL}")