[CMake] check function signature

Bogdan Cristea cristeab at gmail.com
Tue Sep 25 09:24:50 EDT 2012


On Tuesday 25 September 2012 09:18:38 Leif Walsh wrote:
> I use check_function_exists() to do some platform checking.  On Linux,
> pthread_yield() returns int, and on FreeBSD, it returns void.  Is there a
> cmake way to distinguish between the two?  check_function_exists seems to
> not use strict enough warnings to make sure the symbol has the right
> signature at link time.

The simplest way would be to write your own check_function_exists macro in 
order to check for the specific function declaration.

regards
-- 
Bogdan


More information about the CMake mailing list