[cmake-developers] CheckSymbolExists.cmake
Brad King
brad.king at kitware.com
Wed Jun 5 16:14:53 EDT 2013
On 06/05/2013 01:43 PM, Christopher Sean Morrison wrote:
>> > p.s. CHECK_PROTOTYPE_EXISTS is practically useless as written. I'd submit
>> > a patch to fix it, but the fix would look nearly identical to what
>> > CHECK_SYMBOL_EXISTS used to test.
>>
>> Perhaps that is the path forward for your need.
Before working on a patch, can you explain why the current
check is "practically useless"?
> While I work on that patch, to summarize, the meaning of EXISTS
> for the three functions would be/become:
>
> CHECK_FUNCTION_EXISTS: symbol links (defined)
> CHECK_PROTOTYPE_EXISTS: symbol compiles (declared)
> CHECK_SYMBOL_EXISTS: symbol available (declared and defined)
>
> Those ambiguous overlapping names could use some TLC.. :)
> I'd propose the trio be renamed:
The original names were chosen long ago when CMake wasn't
widely used and features were added without much discussion.
While not ideal, they are not "wrong" names.
> CHECK_SYMBOL_EXISTS
> CHECK_SYMBOL_DECLARED
> CHECK_SYMBOL_WORKS
Those names are no better IMO. We won't be changing the names.
At most we would consider adding one new check that has keyword
arguments to be fully generalized.
-Brad
More information about the cmake-developers
mailing list