summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/FindPackageTest/CMakeLists.txt12
-rw-r--r--Tests/FindPackageTest/include/foo.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index 6f1a7e5..a58408c 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -10,3 +10,15 @@ FIND_PACKAGE(NotAPackage QUIET)
FIND_PACKAGE(VTK QUIET)
ADD_EXECUTABLE(FindPackageTest FindPackageTest.cxx)
+
+# test behaviour of cmFindBase wrt. the CMAKE_FIND_PREFIX_PATH variable
+# foo.h should be found in ${CMAKE_CURRENT_SOURCE_DIR}/include:
+
+SET(CMAKE_FIND_PREFIX_PATH /blub /blah "${CMAKE_CURRENT_SOURCE_DIR}")
+FIND_PATH(FOO_DIR foo.h)
+
+IF(NOT FOO_DIR)
+ MESSAGE(FATAL_ERROR "Did not find foo.h which is in ${CMAKE_CURRENT_SOURCE_DIR}/include
+ CMAKE_FIND_PREFIX_PATH = ${CMAKE_FIND_PREFIX_PATH}")
+ENDIF(NOT FOO_DIR)
+
diff --git a/Tests/FindPackageTest/include/foo.h b/Tests/FindPackageTest/include/foo.h
new file mode 100644
index 0000000..2392aee
--- /dev/null
+++ b/Tests/FindPackageTest/include/foo.h
@@ -0,0 +1 @@
+/* empty header file */