diff options
Diffstat (limited to 'Tests/FindPackageTest/CMakeLists.txt')
-rw-r--r-- | Tests/FindPackageTest/CMakeLists.txt | 12 |
1 files changed, 12 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) + |