[CMake] Check for C++ functions existence

Bogdan Cristea cristeab at gmail.com
Sat Sep 1 15:25:40 EDT 2012


Hi

I have found the answer myself, actually it is not possible to implement 
something generic as it is for C functions. My solution is to use as template 
what is done for C functions and adapt that to my needs.

On Saturday 01 September 2012 21:13:10 Markus Blatt wrote:
> As long as it is not a member function check_function_exists should
> suffice.

This will work only if your C++ code uses C functions.

> Otherwise you might want to look at check_cxx_symbol_exists, which
> also can check for a function.

Is not the same thing, check_cxx_symbol_exists checks for symbol existence 
in the given header, while check_function_exists checks for function existence 
in the given library (or in the default one)

regards
-- 
Bogdan


More information about the CMake mailing list