[CMake] CMake fails to find sys/event.h on FreeBSD 10.2

Klemen Ferjančič imbacen at gmail.com
Mon Nov 16 08:38:56 EST 2015


Thank you, that did it.

On 16. 11. 2015 12:00, Rolf Eike Beer wrote:
> Am 16.11.2015 10:47, schrieb Klemen Ferjančič:
>> Can you clarify what you meant with this? To add /usr/incude in
>> CMAKE_REQUIRED_INCLUDES? Doesn't seem to change anything.
>>
>> On 16. 11. 2015 07:35, Rolf Eike Beer wrote:
>>> Am Montag, 16. November 2015, 00:34:01 schrieb Klemen Ferjančič:
>>>> FreeBSD 10.2-STABLE
>>>> CMake 3.3.1
>>>>
>>>> Our projects needs kqueue which means that sys/types.h and sys/event.h
>>>> need to be found. Googling around also revealed that event.h is not
>>>> self
>>>> inclusive but depends on type.h. Not sure if that has to do with
>>>> anything though.
>>>>
>>>> CMakeLists.txt:
>>>> check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
>>>> if (HAVE_SYS_TYPES_H)
>>>> check_include_file_cxx(sys/event.h HAVE_SYS_EVENT_H)
>>>> endif()
>>>
>>> cmake --help-module CheckIncludeFileCXX
>>>
>>> -> CMAKE_REQUIRED_INCLUDES
> 
> Sorry, I was indeed confusing modules. Since it's a C header you can
> just use CheckIncludeFiles (not the trailing 's'), which can check
> several headers at once.
> 
> Greetings,
> 
> Eike


More information about the CMake mailing list