[CMake] CheckIncludeFiles: how to use?
Marcel Loose
loose at astron.nl
Wed Jul 1 04:13:02 EDT 2009
Hi all,
Maybe it's because of a partially sleepless night, but I can't seem to
figure out how I should use check_include_files().
According to the docs (and the implementation) this macro should be used
as:
CHECK_INCLUDE_FILES(INCLUDE VARIABLE)
where INCLUDE should contain the list of files to include.
Problem is, however, that the following doesn't work:
CHECK_INCLUDE_FILES(unistd.h stdio.h var)
because this will assign "unistd.h" to the variable INCLUDE and
"stdio.h" to the variable VARIABLE.
The following also doesn't work:
SET(files unistd.h stdio.h)
CHECK_INCLUDE_FILES(files var)
because the variable INCLUDE is not handled as the name of the list
containing the header files, but as the name of the header file itself.
Am I missing something here, or is this a bug in check_include_files()?
Best regards,
Marcel Loose.
More information about the CMake
mailing list