diff options
author | Brad King <brad.king@kitware.com> | 2020-03-17 12:02:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-17 12:02:15 (GMT) |
commit | 1c99f5df288dbc8a79a38b20db9ff319eb456fe8 (patch) | |
tree | 2ffb57fcc060f30ccd904ac9af664d9966a66d33 /Tests/RunCMake/FindPkgConfig | |
parent | b59f36aad8576ca0ab7a7ecac345d6483d818d3e (diff) | |
download | CMake-1c99f5df288dbc8a79a38b20db9ff319eb456fe8.zip CMake-1c99f5df288dbc8a79a38b20db9ff319eb456fe8.tar.gz CMake-1c99f5df288dbc8a79a38b20db9ff319eb456fe8.tar.bz2 |
FindPkgConfig: Add test for specified pkg-config tool missing
Diffstat (limited to 'Tests/RunCMake/FindPkgConfig')
-rw-r--r-- | Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist-stdout.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist-stdout.txt b/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist-stdout.txt new file mode 100644 index 0000000..ef5f7f6 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist-stdout.txt @@ -0,0 +1,6 @@ +-- Could NOT find PkgConfig \(missing: PKG_CONFIG_EXECUTABLE\) * + Reason given by package: The command + "pkg-config-does-not-exist" --version + failed with output.* +-- PKG_CONFIG_FOUND='FALSE' +-- PKG_CONFIG_EXECUTABLE='' diff --git a/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake b/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake new file mode 100644 index 0000000..a4fabde --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake @@ -0,0 +1,4 @@ +set(PKG_CONFIG_EXECUTABLE "pkg-config-does-not-exist" CACHE FILEPATH "") +find_package(PkgConfig) +message(STATUS "PKG_CONFIG_FOUND='${PKG_CONFIG_FOUND}'") +message(STATUS "PKG_CONFIG_EXECUTABLE='${PKG_CONFIG_EXECUTABLE}'") diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake index b77bb54..9df1d5b 100644 --- a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake @@ -1,5 +1,7 @@ include(RunCMake) +run_cmake(PkgConfigDoesNotExist) + run_cmake(FindPkgConfig_NO_PKGCONFIG_PATH) run_cmake(FindPkgConfig_PKGCONFIG_PATH) run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH) |