[CMake] Check for C++ functions existence

Markus Blatt markus at dr-blatt.de
Sun Sep 2 10:50:30 EDT 2012


On Sat, Sep 01, 2012 at 09:25:40PM +0200, Bogdan Cristea wrote:
> 
> 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)

According to the documentation it checks linking for functions and variables:

"If the header files declare the symbol as a function or variable then
the symbol must  also be available for linking. "

But maybe I am misinterpreting that sentence...

Cheers,

Markus
-- 
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany,  USt-Id: DE279960836


More information about the CMake mailing list