[CMake] --debug-trycompile causes false positives from check_function_exists

Jack Poulson jack.poulson at gmail.com
Fri Feb 11 02:57:11 EST 2011


On Fri, Feb 11, 2011 at 1:47 AM, Michael Wild <themiwi at gmail.com> wrote:

> On 02/11/2011 04:30 AM, Jack Poulson wrote:
> > This is occurring with CMake 2.8.3 on OSX for several different
> > check_function_exists calls. Is this expected behavior?
> >
> > Jack
>
> Seriously, we're going to need some more information than just "I get
> false positives"...
>
>
I did not give any more information because, well, it seems to _always_ give
false positives with those settings. I don't really care if it's fixed
because I can easily work around it, but I thought I'd give you guys a heads
up.

If it helps, this is the relevant snippet:

include(CheckFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES ${MATH_LIBS})
check_function_exists(vdSin MKL)
check_function_exists(vsin MASS)

If I run without --debug-trycompile when I am not linking in the MKL or MASS
libraries, the routines vdSin and vsin are not found. When I run with
--debug-trycompile, they are found. That's all I have time to give. Use it
or not. I'm not asking for help.

Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110211/5556fe9a/attachment.htm>


More information about the CMake mailing list