[CMake] Check header file woos
Jakub Zakrzewski
jzakrzewski at e2e.ch
Wed Feb 19 04:36:04 EST 2014
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-bounces at cmake.org] On Behalf Of Oliver
Sent: Dienstag, 18. Februar 2014 22:11
To: cmake at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140219/68867e4c/attachment-0001.html>
More information about the CMake
mailing list