summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/find_program
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-12-11 18:01:09 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2019-12-19 13:09:49 (GMT)
commit204b8d9f4e9c5a64e1fa6a0ee4e6dc2911694bae (patch)
tree6b7eaf2f85d6b05e69e3980eff430129ae8d324f /Tests/RunCMake/find_program
parenta7ea20649d4593bbad70b8a99aab4c2bf6294b79 (diff)
downloadCMake-204b8d9f4e9c5a64e1fa6a0ee4e6dc2911694bae.zip
CMake-204b8d9f4e9c5a64e1fa6a0ee4e6dc2911694bae.tar.gz
CMake-204b8d9f4e9c5a64e1fa6a0ee4e6dc2911694bae.tar.bz2
find_*: Use debug logging infrastructure
Teach the find_package, find_library, find_program, find_path, and find_file commands to print debug log messages when enabled by the `--debug-find` command-line option or `CMAKE_FIND_DEBUG_MODE` variable.
Diffstat (limited to 'Tests/RunCMake/find_program')
-rw-r--r--Tests/RunCMake/find_program/EnvAndHints-stderr.txt28
-rw-r--r--Tests/RunCMake/find_program/EnvAndHints.cmake2
2 files changed, 30 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_program/EnvAndHints-stderr.txt b/Tests/RunCMake/find_program/EnvAndHints-stderr.txt
new file mode 100644
index 0000000..8951345
--- /dev/null
+++ b/Tests/RunCMake/find_program/EnvAndHints-stderr.txt
@@ -0,0 +1,28 @@
+ find_program called with the following settings:.*
+ VAR: PROG
+ NAMES: \"testAandB\"
+ Documentation.*
+ Framework.*
+ AppBundle.*
+ CMAKE_FIND_USE_CMAKE_PATH: 1
+ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
+
+ find_program considered the following locations:.*
+ The item was found at.*
+.*testAandB
+.*
+ find_program called with the following settings:.*
+ VAR: PROG
+ NAMES: \"testAandB\"
+ Documentation.*
+ Framework.*
+ AppBundle.*
+ CMAKE_FIND_USE_CMAKE_PATH: 1
+ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
+ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 0
+ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
+
+ find_program considered the following locations:.*
+ The item was not found.*
diff --git a/Tests/RunCMake/find_program/EnvAndHints.cmake b/Tests/RunCMake/find_program/EnvAndHints.cmake
index 0f12eff..beed873 100644
--- a/Tests/RunCMake/find_program/EnvAndHints.cmake
+++ b/Tests/RunCMake/find_program/EnvAndHints.cmake
@@ -1,4 +1,5 @@
+set(CMAKE_FIND_DEBUG_MODE 1)
set(ENV_PATH "$ENV{PATH}")
set(ENV{PATH} ${CMAKE_CURRENT_SOURCE_DIR}/A)
find_program(PROG
@@ -13,6 +14,7 @@ find_program(PROG
)
message(STATUS "PROG='${PROG}'")
unset(PROG CACHE)
+set(CMAKE_FIND_DEBUG_MODE 0)
find_program(PROG
NAMES testAandB