|
|
|
@ -30,9 +30,9 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
|
|
|
|
|
IF(CMAKE_OBJDUMP)
|
|
|
|
|
# Use objdump to check if a library is using an external symbol
|
|
|
|
|
EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-T ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE OBJDUMP_SYMBOL)
|
|
|
|
|
IF(OBJDUMP_SYMBOL MATCHES "UND")
|
|
|
|
|
IF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
|
|
|
|
SET(${SYMBOL_FOUND} FALSE)
|
|
|
|
|
ENDIF(OBJDUMP_SYMBOL MATCHES "UND")
|
|
|
|
|
ENDIF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
|
|
|
|
ENDIF(CMAKE_OBJDUMP)
|
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
ENDMACRO(CHECK_UNDEFINED_SYMBOL)
|
|
|
|
@ -69,9 +69,9 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
|
|
|
|
# TODO: under Solaris use dump -Lv <lib>
|
|
|
|
|
# Use objdump to check if a library is linked to another library
|
|
|
|
|
EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-p ${${MYLIBRARY}} | grep ${LIBNAME}" OUTPUT_VARIABLE OBJDUMP_LIBRARY)
|
|
|
|
|
IF(NOT OBJDUMP_LIBRARY MATCHES "NEEDED")
|
|
|
|
|
IF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
|
|
|
|
SET(${LIBRARY_FOUND} TRUE)
|
|
|
|
|
ENDIF(NOT OBJDUMP_LIBRARY MATCHES "NEEDED")
|
|
|
|
|
ENDIF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
|
|
|
|
ENDIF(CMAKE_OBJDUMP)
|
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
ENDMACRO(CHECK_LINKED_LIBRARY)
|
|
|
|
|