[CMake] Checking function or symbol in namespace

Jed Brown jed at 59A2.org
Thu Jan 21 10:57:29 EST 2010


On Thu, 21 Jan 2010 15:44:43 +0000, Mateusz Loskot <mateusz at loskot.net> wrote:
> Why it can not work, actually?

C++ does name mangling so it's difficult to determine what the symbol
actually is (you have to know about various classes and templates that
may be in scope), therefore the interface would look a bit different.
In particular, it would require locating and including headers because
"private" details of a template library can change how the symbol is
mangled.

It's almost certainly the case that it works for C because it's easy to
make work for C, and not for C++ because that would be hard, and you
probably need to use check_cxx_source_compiles/check_cxx_source_runs in
order to find a C++ symbol anyway.

Jed


More information about the CMake mailing list