[cmake-developers] Adding CheckCXXSymbolsExists.cmake ?

Alexander Neundorf neundorf at kde.org
Wed Jul 6 16:55:23 EDT 2011


On Wednesday 06 July 2011, Eric Noulard wrote:
> > I just found that I started with this already 5 years ago:
> > http://www.cmake.org/pipermail/cmake-developers/2006-September/000123.htm
> > l
> > 
> > Conclusion was that it's ok, but the existing check_something() macros
> > should be renamed to check_something_C() and check_something_CXX()
> > should be added.
> > 
> > Not sure I like that, since it would deprecate all existing
> > check_something() macros.
> > 
> > So, just go ahead with adding it as CHECK_CXX_SYMBOL_EXISTS() or
> > CHECK_SYMBOL_EXISTS_CXX() and if the macro name has no language in it, it
> > is implicitely C ?
> 
> I would rather go with a backward compatible option i.e.:
> No language means C.
> 
> Note that you'll need name mangling for
> 
> CMAKE_REQUIRED_xxxx vars too.
> i.e.
> CMAKE_CXX_REQUIRED_xxxxx

Hmm, actually I don't think this is necessary.
Personally I would make sure that CMAKE_REQUIRED_xxx is set appropriately 
before any cmake_check_foo() call.
(see my other mail about push/pop_required_variables())

Alex




More information about the cmake-developers mailing list