Is there any reason, why including just this header is not enough? Maybe some required definitions missing? CMake checks includes by compiling a simple program that does nothing. If compilation fails, the header is assumed not to exist. Those CMake flags can be helpful in diagnosing the issue:
--debug-trycompile = Do not delete the try_compile build tree. Only useful on one try_compile at a time. --debug-output = Put cmake in a debug mode. --trace = Put cmake in trace mode. -- Gruesse, Jakub From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Oliver Sent: Dienstag, 18. Februar 2014 22:11 To: cmake@cmake.org Subject: [CMake] Check header file woos All, I am trying to use CheckIncludeFiles for header file check. I know the file I want to check is located at /usr/include/lustre, so I supplied the following: include(CheckIncludeFiles) check_include_files("lustre/lustre_user.h" HAVE_LUSTRE_USER_H) And it report can't find. Then I tried to be explicit about it set(CMAKE_REQUIRED_INCLUDES /usr/include/lustre) Still no avail. If I check any other header file in that directory, say "sys/io.h", it will work as expected. I am puzzled ... anything I missed? Thanks -- Oliver
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake