[Cmake-commits] [cmake-commits] hoffman committed FindBaseTest.cmake.in 1.2 1.2.4.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jun 13 08:55:20 EDT 2008
Update of /cvsroot/CMake/CMake/Tests/CMakeTests
In directory public:/mounts/ram/cvs-serv21498/Tests/CMakeTests
Modified Files:
Tag: CMake-2-6
FindBaseTest.cmake.in
Log Message:
ENH: merge in changes from head
Index: FindBaseTest.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeTests/FindBaseTest.cmake.in,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C 2 -d -r1.2 -r1.2.4.1
*** FindBaseTest.cmake.in 17 May 2007 17:20:44 -0000 1.2
--- FindBaseTest.cmake.in 13 Jun 2008 12:55:18 -0000 1.2.4.1
***************
*** 1,6 ****
--- 1,11 ----
set(MY_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
+ # The find_* commands do path normalization so we should do so too
+ # before comparing results.
+ get_filename_component(MY_SOURCE_DIR "${MY_SOURCE_DIR}" ABSOLUTE)
+
set(_HEADER cmake_i_do_not_exist_in_the_system.h)
set(_HEADER_FULL "${MY_SOURCE_DIR}/include/${_HEADER}")
+ set(_HEADER_FULL_A "${MY_SOURCE_DIR}/A/include/${_HEADER}")
# at first check that the header isn't found without special measures
***************
*** 10,13 ****
--- 15,31 ----
endif(FOO_H_1)
+ # The HINTS option should override the system but the PATHS option
+ # should not.
+ set(CMAKE_SYSTEM_PREFIX_PATH ${MY_SOURCE_DIR})
+ 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}")
+ 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}")
+ set(CMAKE_SYSTEM_PREFIX_PATH)
+
# with this it still should not be found, since the include/ subdir is still missing
set(CMAKE_INCLUDE_PATH "${MY_SOURCE_DIR}")
More information about the Cmake-commits
mailing list