summaryrefslogtreecommitdiff
path: root/Tests/CMakeTests/FindBaseTest.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeTests/FindBaseTest.cmake.in')
-rw-r--r--Tests/CMakeTests/FindBaseTest.cmake.in16
1 files changed, 8 insertions, 8 deletions
diff --git a/Tests/CMakeTests/FindBaseTest.cmake.in b/Tests/CMakeTests/FindBaseTest.cmake.in
index 47c1692..658b350 100644
--- a/Tests/CMakeTests/FindBaseTest.cmake.in
+++ b/Tests/CMakeTests/FindBaseTest.cmake.in
@@ -12,7 +12,7 @@ set(_HEADER_FULL_A "${MY_SOURCE_DIR}/A/include/${_HEADER}")
find_file(FOO_H_1 ${_HEADER})
if(FOO_H_1)
message(FATAL_ERROR "${_HEADER} found: ${FOO_H_1}, it should not exist !")
-endif(FOO_H_1)
+endif()
# The HINTS option should override the system but the PATHS option
# should not.
@@ -21,10 +21,10 @@ find_file(TEST_H_1 ${_HEADER} HINTS ${MY_SOURCE_DIR}/A/include)
find_file(TEST_H_2 ${_HEADER} PATHS ${MY_SOURCE_DIR}/A/include)
if(NOT "${TEST_H_1}" STREQUAL "${_HEADER_FULL_A}")
message(FATAL_ERROR "Did not find \"${_HEADER_FULL_A}\"\ngot \"${TEST_H_1}\" instead!")
-endif(NOT "${TEST_H_1}" STREQUAL "${_HEADER_FULL_A}")
+endif()
if(NOT "${TEST_H_2}" STREQUAL "${_HEADER_FULL}")
message(FATAL_ERROR "Did not find \"${_HEADER_FULL}\"\ngot \"${TEST_H_2}\" instead!")
-endif(NOT "${TEST_H_2}" STREQUAL "${_HEADER_FULL}")
+endif()
set(CMAKE_SYSTEM_PREFIX_PATH)
# with this it still should not be found, since the include/ subdir is still missing
@@ -32,20 +32,20 @@ set(CMAKE_INCLUDE_PATH "${MY_SOURCE_DIR}")
find_file(FOO_H_2 ${_HEADER})
if(FOO_H_2)
message(FATAL_ERROR "${_HEADER} found: ${FOO_H_2}, it should not exist !")
-endif(FOO_H_2)
+endif()
# now with the PATH_SUFFIX it should be found
find_file(FOO_H_3 NAMES ${_HEADER} PATH_SUFFIXES include )
if(NOT "${FOO_H_3}" STREQUAL "${_HEADER_FULL}")
message(FATAL_ERROR "Did not find \"${_HEADER_FULL}\"\ngot ${FOO_H_3} instead !")
-endif(NOT "${FOO_H_3}" STREQUAL "${_HEADER_FULL}")
+endif()
# without PATH_SUFFIX, but with a CMAKE_INCLUDE_PATH it should not be found
set(CMAKE_INCLUDE_PATH /include)
find_file(FOO_H_4 ${_HEADER})
if(FOO_H_4)
message(FATAL_ERROR "${_HEADER} found: ${FOO_H_4}, it should not exist !")
-endif(FOO_H_4)
+endif()
# when setting CMAKE_FIND_ROOT_PATH to the current source dir,
# together with the CMAKE_INCLUDE_PATH it should be found
@@ -53,10 +53,10 @@ set(CMAKE_FIND_ROOT_PATH blub "${MY_SOURCE_DIR}")
find_file(FOO_H_5 ${_HEADER})
if(NOT "${FOO_H_5}" STREQUAL "${_HEADER_FULL}")
message(FATAL_ERROR "Did not find \"${_HEADER_FULL}\"\ngot ${FOO_H_5} instead !")
-endif(NOT "${FOO_H_5}" STREQUAL "${_HEADER_FULL}")
+endif()
# by explicitly disabling CMAKE_FIND_ROOT_PATH again it shouldn't be found
find_file(FOO_H_6 ${_HEADER} NO_CMAKE_FIND_ROOT_PATH)
if(FOO_H_6)
message(FATAL_ERROR "${_HEADER} found: ${FOO_H_6}, it should not exist !")
-endif(FOO_H_6)
+endif()