[CMake] Math lib with CMAKE_REQUIRED_LIBRARIES

Moreland, Kenneth kmorel at sandia.gov
Tue May 3 14:38:44 EDT 2005


I'm setting CMAKE_REQUIRED_LIBRARIES and using CHECK_FUNCTION_EXISTS to
test the existence of a function in a library.  However, sometimes the
library in question relies on the math library, which is not
automatically added to the link that CHECK_FUNCTION_EXISTS is using.
How do you ensure that the math library is added to the link in a
platform independent way?

-Ken

   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********  
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      fax:   (505) 845-0833



More information about the CMake mailing list