diff options
author | Brad King <brad.king@kitware.com> | 2017-08-10 13:22:08 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-08-10 13:22:17 (GMT) |
commit | 311f338ddcff2aeec5f8c9c2637df1551c2c3634 (patch) | |
tree | 37cee56608da982ebe5500447296632c4ea0aa2b /Tests/RunCMake/find_package/PackageRoot.cmake | |
parent | f4e66b41d8de32ff4194207759d46fa9f15ce13c (diff) | |
parent | e574bce15b4063a92ca213b20f31532d45704619 (diff) | |
download | CMake-311f338ddcff2aeec5f8c9c2637df1551c2c3634.zip CMake-311f338ddcff2aeec5f8c9c2637df1551c2c3634.tar.gz CMake-311f338ddcff2aeec5f8c9c2637df1551c2c3634.tar.bz2 |
Merge topic 'find-package_root-test-regex'
e574bce1 Tests: Simplify RunCMake.find_package PackageRoot case regexes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Chuck Atkins <chuck.atkins@kitware.com>
Merge-request: !1115
Diffstat (limited to 'Tests/RunCMake/find_package/PackageRoot.cmake')
-rw-r--r-- | Tests/RunCMake/find_package/PackageRoot.cmake | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Tests/RunCMake/find_package/PackageRoot.cmake b/Tests/RunCMake/find_package/PackageRoot.cmake index 89e51a8..4c4f4c2 100644 --- a/Tests/RunCMake/find_package/PackageRoot.cmake +++ b/Tests/RunCMake/find_package/PackageRoot.cmake @@ -3,6 +3,11 @@ cmake_policy(SET CMP0057 NEW) list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot) set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot) +function(PrintPath label path) + string(REPLACE "${PackageRoot_BASE}" "<base>" out "${path}") + message("${label}${out}") +endfunction() + macro(CleanUpPackageRootTest) unset(Foo_ROOT) unset(ENV{Foo_ROOT}) @@ -20,17 +25,17 @@ endmacro() macro(RunPackageRootTest) message("----------") - message("Foo_ROOT :${Foo_ROOT}") - message("ENV{Foo_ROOT} :$ENV{Foo_ROOT}") + PrintPath("Foo_ROOT :" "${Foo_ROOT}") + PrintPath("ENV{Foo_ROOT} :" "$ENV{Foo_ROOT}") message("") find_package(Foo) message("find_package(Foo)") - message("FOO_TEST_FILE_FOO :${FOO_TEST_FILE_FOO}") - message("FOO_TEST_FILE_ZOT :${FOO_TEST_FILE_ZOT}") - message("FOO_TEST_PATH_FOO :${FOO_TEST_PATH_FOO}") - message("FOO_TEST_PATH_ZOT :${FOO_TEST_PATH_ZOT}") - message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}") + PrintPath("FOO_TEST_FILE_FOO :" "${FOO_TEST_FILE_FOO}") + PrintPath("FOO_TEST_FILE_ZOT :" "${FOO_TEST_FILE_ZOT}") + PrintPath("FOO_TEST_PATH_FOO :" "${FOO_TEST_PATH_FOO}") + PrintPath("FOO_TEST_PATH_ZOT :" "${FOO_TEST_PATH_ZOT}") + PrintPath("FOO_TEST_PROG_FOO :" "${FOO_TEST_PROG_FOO}") CleanUpPackageRootTest() message("") endmacro() |