Hello all,

I'm a newbie using CMake and I'm trying to migrate the compilation of a
fortran project to CMake.

I'm trying to detect the METIS library with find_library(). Inside my
FindMETIS.cmake I want to check the existence of some functions to set the
library version with:

CHECK_LIBRARY_EXISTS(metis METIS_SetDefaultOptions /path/to/metis
VARIABLE_NAME)


If /path/to/metis contains the METIS shared library (libmetis.so) it works
as expected, but if /path/to/metis only contains the static version of the
library (libmetis.a) CHECK_LIBRARY_EXISTS cannot found this function...

I check that the library contains this function with the following result:

$ nm libmetis.a  | grep -i setdefaultoptions
> 0000000000000210 T metis_setdefaultoptions
> 0000000000000220 T metis_setdefaultoptions_
> 0000000000000230 T metis_setdefaultoptions__
>                              U METIS_SetDefaultOptions
> 0000000000000200 T METIS_SETDEFAULTOPTIONS
>                              U METIS_SetDefaultOptions
> 0000000000000030 T METIS_SetDefaultOptions
>

I don't know if this the expected behaviour of this macro, but anyway I
need to do this check in both, shared and static library. How can I do this?

Any help would be appreciated.

Thanks,
VĂ­ctor.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to