[CMake] Check_include_file is supposed make a definition?

Johannes Zarl-Zierl johannes.zarl-zierl at jku.at
Wed Jun 10 04:21:51 EDT 2015


On Wednesday 10 June 2015 00:48:06 J Decker wrote:
> CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
> 
> is this supposed to create some sort of ADD_DEFINITION( -DHAVE_STDINT_H) ?

No.

> if not what else do I have to do to make that work?

IF(HAVE_STDINT_H)
  ADD_DEFINITION(HAVE_STDINT_H)
ENDIF()

If you want to do this always, you can write a wrapper function, of course...

Cheers,
  Johannes


More information about the CMake mailing list