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.
25 lines
957 B
25 lines
957 B
3 years ago
|
set(ENV_PATH "$ENV{PATH}")
|
||
|
foreach(path "/does_not_exist" "/include" "")
|
||
|
unset(PrefixInPATH_File CACHE)
|
||
|
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}")
|
||
|
find_file(PrefixInPATH_File NAMES PrefixInPATH.h)
|
||
|
message(STATUS "PrefixInPATH_File='${PrefixInPATH_File}'")
|
||
|
endforeach()
|
||
|
|
||
|
set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF)
|
||
|
foreach(path "/does_not_exist" "/include" "")
|
||
|
unset(PrefixInPATH_File CACHE)
|
||
|
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}")
|
||
|
find_file(PrefixInPATH_File NAMES PrefixInPATH.h)
|
||
|
message(STATUS "PrefixInPATH_File='${PrefixInPATH_File}'")
|
||
|
endforeach()
|
||
|
|
||
|
set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH ON)
|
||
|
foreach(path "/does_not_exist" "/include" "")
|
||
|
unset(PrefixInPATH_File CACHE)
|
||
|
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}")
|
||
|
find_file(PrefixInPATH_File NAMES PrefixInPATH.h NO_SYSTEM_ENVIRONMENT_PATH)
|
||
|
message(STATUS "PrefixInPATH_File='${PrefixInPATH_File}'")
|
||
|
endforeach()
|
||
|
set(ENV{PATH} "${ENV_PATH}")
|