summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-21 13:08:25 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-21 13:08:25 (GMT)
commit2c3b8a1cd801a8c3c5331d8345bf8ed6d9e38595 (patch)
tree542e5c948272622ee75902124e639af01855447a /Tests
parentd9857c84574a8bd5c2d6739580fa98b6b2f8cefc (diff)
parent6f4f90548353d9e329bd4ddb2f7492788f28f0e1 (diff)
downloadCMake-2c3b8a1cd801a8c3c5331d8345bf8ed6d9e38595.zip
CMake-2c3b8a1cd801a8c3c5331d8345bf8ed6d9e38595.tar.gz
CMake-2c3b8a1cd801a8c3c5331d8345bf8ed6d9e38595.tar.bz2
Merge branch 'fix-repeat-pkg-config' into release
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
index 8d8d000..d0046ca 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
@@ -1,14 +1,15 @@
+cmake_minimum_required(VERSION 3.3)
+
find_package(PkgConfig REQUIRED)
pkg_check_modules(NCURSES QUIET ncurses)
if (NCURSES_FOUND)
foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
- get_property("${variable}"
+ get_property(value
CACHE "NCURSES_${variable}"
- PROPERTY TYPE
- SET)
- if (NOT ${variable})
- message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}")
+ PROPERTY VALUE)
+ if (NOT value STREQUAL NCURSES_${variable})
+ message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}:\nexpected -->${value}<--\nreceived -->${NCURSES_${variable}}<--")
endif ()
endforeach ()
else ()