blob: beed873caa6a7534b8455e340eb03f8a10425f1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
set(CMAKE_FIND_DEBUG_MODE 1)
set(ENV_PATH "$ENV{PATH}")
set(ENV{PATH} ${CMAKE_CURRENT_SOURCE_DIR}/A)
find_program(PROG
NAMES testAandB
)
message(STATUS "PROG='${PROG}'")
unset(PROG CACHE)
set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF)
find_program(PROG
NAMES testAandB
)
message(STATUS "PROG='${PROG}'")
unset(PROG CACHE)
set(CMAKE_FIND_DEBUG_MODE 0)
find_program(PROG
NAMES testAandB
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/B ${CMAKE_CURRENT_SOURCE_DIR}/A
)
message(STATUS "PROG='${PROG}'")
unset(PROG CACHE)
set(ENV{PATH} "${ENV_PATH}")
find_program(PROG
NAMES testAandB
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
)
message(STATUS "PROG='${PROG}'")
unset(PROG CACHE)
set(ENV{PATH} "${ENV_PATH}")
|