diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/find_file/PrefixInPATH-stderr.txt | 13 | ||||
-rw-r--r-- | Tests/RunCMake/find_file/PrefixInPATH.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/find_library/FromPATHEnv-stderr.txt | 28 | ||||
-rw-r--r-- | Tests/RunCMake/find_library/FromPATHEnv.cmake | 13 | ||||
-rw-r--r-- | Tests/RunCMake/find_library/PrefixInPATH-stderr.txt | 14 | ||||
-rw-r--r-- | Tests/RunCMake/find_library/PrefixInPATH.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/FromPATHEnv-stderr.txt | 16 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/FromPATHEnv.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/MissingConfigDebug-stderr.txt | 17 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/MissingConfigDebug.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/find_path/FromPATHEnv-stderr.txt | 27 | ||||
-rw-r--r-- | Tests/RunCMake/find_path/FromPATHEnv.cmake | 12 | ||||
-rw-r--r-- | Tests/RunCMake/find_program/EnvAndHints-stderr.txt | 28 | ||||
-rw-r--r-- | Tests/RunCMake/find_program/EnvAndHints.cmake | 2 |
15 files changed, 193 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_file/PrefixInPATH-stderr.txt b/Tests/RunCMake/find_file/PrefixInPATH-stderr.txt new file mode 100644 index 0000000..0d77571 --- /dev/null +++ b/Tests/RunCMake/find_file/PrefixInPATH-stderr.txt @@ -0,0 +1,13 @@ + find_file called with the following settings:.* + VAR: PrefixInPATH_INCLUDE_DIR + NAMES: \"PrefixInPATH\.h\" + 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_file considered the following locations:.* +.*include/PrefixInPATH.* diff --git a/Tests/RunCMake/find_file/PrefixInPATH.cmake b/Tests/RunCMake/find_file/PrefixInPATH.cmake index 1e33c08..c334d89 100644 --- a/Tests/RunCMake/find_file/PrefixInPATH.cmake +++ b/Tests/RunCMake/find_file/PrefixInPATH.cmake @@ -1,4 +1,10 @@ set(ENV_PATH "$ENV{PATH}") + +set(CMAKE_FIND_DEBUG_MODE 1) +set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/bin") +find_file(PrefixInPATH_INCLUDE_DIR NAMES PrefixInPATH.h) +set(CMAKE_FIND_DEBUG_MODE 0) + foreach(path "/does_not_exist" "" "/bin" "/sbin") unset(PrefixInPATH_INCLUDE_DIR CACHE) set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}") diff --git a/Tests/RunCMake/find_library/FromPATHEnv-stderr.txt b/Tests/RunCMake/find_library/FromPATHEnv-stderr.txt new file mode 100644 index 0000000..a690eec --- /dev/null +++ b/Tests/RunCMake/find_library/FromPATHEnv-stderr.txt @@ -0,0 +1,28 @@ + find_library called with the following settings:.* + VAR: CREATED_LIBRARY + NAMES: \"created\" + \"created_no_exist\" + 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_library considered the following locations:.* + The item was not found.* + find_library called with the following settings:.* + VAR: CREATED_LIBRARY + NAMES: \"created\" + 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_library considered the following locations:.* + The item was found at.* +.*lib/libcreated.a diff --git a/Tests/RunCMake/find_library/FromPATHEnv.cmake b/Tests/RunCMake/find_library/FromPATHEnv.cmake index fec041d..c24e640 100644 --- a/Tests/RunCMake/find_library/FromPATHEnv.cmake +++ b/Tests/RunCMake/find_library/FromPATHEnv.cmake @@ -4,6 +4,19 @@ set(ENV_PATH "$ENV{PATH}") file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lib/libcreated.a" "created") +set(CMAKE_FIND_DEBUG_MODE 1) +set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF) + +set(ENV{PATH} "${CMAKE_CURRENT_BINARY_DIR}/lib") +find_library(CREATED_LIBRARY NAMES created created_no_exist) + +set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH ON) + +set(ENV{PATH} "${CMAKE_CURRENT_BINARY_DIR}/lib") +find_library(CREATED_LIBRARY NAMES created) +set(CMAKE_FIND_DEBUG_MODE 0) + + foreach(path "/does_not_exist" "/lib" "") unset(CREATED_LIBRARY CACHE) set(ENV{PATH} "${CMAKE_CURRENT_BINARY_DIR}${path}") diff --git a/Tests/RunCMake/find_library/PrefixInPATH-stderr.txt b/Tests/RunCMake/find_library/PrefixInPATH-stderr.txt new file mode 100644 index 0000000..1d24c84 --- /dev/null +++ b/Tests/RunCMake/find_library/PrefixInPATH-stderr.txt @@ -0,0 +1,14 @@ + find_library called with the following settings:.* + VAR: PrefixInPATH_LIBRARY + NAMES: \"PrefixInPATH\" + 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_library considered the following locations:.* +.*/does_not_exist.* + The item was not found diff --git a/Tests/RunCMake/find_library/PrefixInPATH.cmake b/Tests/RunCMake/find_library/PrefixInPATH.cmake index f1b8b18..e27d362 100644 --- a/Tests/RunCMake/find_library/PrefixInPATH.cmake +++ b/Tests/RunCMake/find_library/PrefixInPATH.cmake @@ -2,6 +2,12 @@ list(APPEND CMAKE_FIND_LIBRARY_PREFIXES lib) list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .a) set(ENV_PATH "$ENV{PATH}") + +set(CMAKE_FIND_DEBUG_MODE 1) +set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/does_not_exist") +find_library(PrefixInPATH_LIBRARY NAMES PrefixInPATH) +set(CMAKE_FIND_DEBUG_MODE 0) + foreach(path "/does_not_exist" "" "/bin" "/sbin") unset(PrefixInPATH_LIBRARY CACHE) set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}") diff --git a/Tests/RunCMake/find_package/FromPATHEnv-stderr.txt b/Tests/RunCMake/find_package/FromPATHEnv-stderr.txt new file mode 100644 index 0000000..5856d56 --- /dev/null +++ b/Tests/RunCMake/find_package/FromPATHEnv-stderr.txt @@ -0,0 +1,16 @@ +CMake Debug Log at FromPATHEnv.cmake:5 \(find_package\): + find_package considered the following paths for Resolved.cmake +.* + <PackageName>_ROOT CMake variable.* + CMAKE_PREFIX_PATH variable.* + CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH variables.* + Env variable Resolved_DIR.* + CMAKE_PREFIX_PATH env variable.* + Paths specified by the find_package HINTS option.* + Standard system environment variables.* +.*Tests/RunCMake/find_package/PackageRoot.* + CMake User Package Registry.* + CMake variables defined in the Platform file.* + CMake System Package Registry.* + Paths specified by the find_package PATHS option.* + Checking file.*\[.*Tests/RunCMake/find_package/PackageRoot/ResolvedConfig\.cmake\] diff --git a/Tests/RunCMake/find_package/FromPATHEnv.cmake b/Tests/RunCMake/find_package/FromPATHEnv.cmake index 4822b13..ceb79b6 100644 --- a/Tests/RunCMake/find_package/FromPATHEnv.cmake +++ b/Tests/RunCMake/find_package/FromPATHEnv.cmake @@ -1,4 +1,10 @@ set(ENV_PATH "$ENV{PATH}") + +set(CMAKE_FIND_DEBUG_MODE ON) +set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot") +find_package(Resolved QUIET) +set(CMAKE_FIND_DEBUG_MODE OFF) + foreach(path "/does_not_exist" "/PackageRoot" "") unset(Resolved_FOUND CACHE) set(Resolved_DIR "") diff --git a/Tests/RunCMake/find_package/MissingConfigDebug-stderr.txt b/Tests/RunCMake/find_package/MissingConfigDebug-stderr.txt new file mode 100644 index 0000000..8ff04a9 --- /dev/null +++ b/Tests/RunCMake/find_package/MissingConfigDebug-stderr.txt @@ -0,0 +1,17 @@ + <PackageName>_ROOT CMake variable.* + CMAKE_PREFIX_PATH variable.* + CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH variables.* + Env variable NotHere_DIR.* + CMAKE_PREFIX_PATH env variable.* + Standard system environment variables.* + CMake User Package Registry.* + CMake variables defined in the Platform file.* + CMake System Package Registry.* + Paths specified by the find_package PATHS option.* +.* + Checking file \[.*NotHereConfig.cmake\].* + Checking file \[.*nothere-config.cmake\].* +CMake Warning at MissingConfigDebug.cmake:3 \(message\): + This warning must be reachable. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/find_package/MissingConfigDebug.cmake b/Tests/RunCMake/find_package/MissingConfigDebug.cmake new file mode 100644 index 0000000..4e3bb22 --- /dev/null +++ b/Tests/RunCMake/find_package/MissingConfigDebug.cmake @@ -0,0 +1,4 @@ +set(CMAKE_FIND_DEBUG_MODE ON) +find_package(NotHere CONFIG) +message(WARNING "This warning must be reachable.") +set(CMAKE_FIND_DEBUG_MODE OFF) diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake index 208f83c..5186297 100644 --- a/Tests/RunCMake/find_package/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake @@ -13,6 +13,7 @@ run_cmake(MissingNormalWarnNoModuleNew) run_cmake(MissingModule) run_cmake(MissingModuleRequired) run_cmake(MissingConfig) +run_cmake(MissingConfigDebug) run_cmake(MissingConfigOneName) run_cmake(MissingConfigRequired) run_cmake(MissingConfigVersion) diff --git a/Tests/RunCMake/find_path/FromPATHEnv-stderr.txt b/Tests/RunCMake/find_path/FromPATHEnv-stderr.txt new file mode 100644 index 0000000..088efd5 --- /dev/null +++ b/Tests/RunCMake/find_path/FromPATHEnv-stderr.txt @@ -0,0 +1,27 @@ + find_path called with the following settings:.* + VAR: PATH_IN_ENV_PATH + NAMES: \"PrefixInPATH\.h\" + 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_path considered the following locations:.* + The item was not found.* + find_path called with the following settings:.* + VAR: PATH_IN_ENV_PATH + NAMES: \"PrefixInPATH\.h\" + 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_path considered the following locations:.* + The item was found at.* +.*include/PrefixInPATH.* diff --git a/Tests/RunCMake/find_path/FromPATHEnv.cmake b/Tests/RunCMake/find_path/FromPATHEnv.cmake index af13d09..535e624 100644 --- a/Tests/RunCMake/find_path/FromPATHEnv.cmake +++ b/Tests/RunCMake/find_path/FromPATHEnv.cmake @@ -1,4 +1,16 @@ set(ENV_PATH "$ENV{PATH}") + +set(CMAKE_FIND_DEBUG_MODE 1) +set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF) + +set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/include") +find_path(PATH_IN_ENV_PATH NAMES PrefixInPATH.h) + +set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH ON) +find_path(PATH_IN_ENV_PATH NAMES PrefixInPATH.h) + +set(CMAKE_FIND_DEBUG_MODE 0) + foreach(path "/does_not_exist" "/include" "") unset(PATH_IN_ENV_PATH CACHE) set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}") 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 |