mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-05 23:09:04 +00:00
Fixed: Missing objdump binary name in CheckDepends.cmake
This commit is contained in:
parent
e1f07a5a1c
commit
fed0f18b42
1 changed files with 11 additions and 0 deletions
|
@ -27,11 +27,16 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
|
|||
ENDIF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
||||
ENDIF(CMAKE_NM)
|
||||
ELSEIF(UNIX)
|
||||
SET(CMAKE_OBJDUMP objdump)
|
||||
IF(CMAKE_OBJDUMP)
|
||||
# Use objdump to check if a library is using an external symbol
|
||||
#MESSAGE(STATUS "exec ${CMAKE_OBJDUMP} -T ${${MYLIBRARY}} | grep ${SYMBOL}")
|
||||
EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-T ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE OBJDUMP_SYMBOL)
|
||||
IF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
||||
#MESSAGE(STATUS "${${MYLIBRARY}} does not use symbol ${SYMBOL}")
|
||||
SET(${SYMBOL_FOUND} FALSE)
|
||||
ELSE(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
||||
#MESSAGE(STATUS "${${MYLIBRARY}} uses symbol ${SYMBOL}")
|
||||
ENDIF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
||||
ENDIF(CMAKE_OBJDUMP)
|
||||
ENDIF(WIN32)
|
||||
|
@ -64,13 +69,18 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
|||
ENDIF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
||||
ENDIF(CMAKE_OTOOL)
|
||||
ELSEIF(UNIX)
|
||||
SET(CMAKE_OBJDUMP objdump)
|
||||
IF(CMAKE_OBJDUMP)
|
||||
GET_FILENAME_COMPONENT(LIBNAME "${${OTHERLIBRARY}}" NAME)
|
||||
# TODO: under Solaris use dump -Lv <lib>
|
||||
# Use objdump to check if a library is linked to another library
|
||||
#MESSAGE(STATUS "exec ${CMAKE_OBJDUMP} -p ${${MYLIBRARY}} | grep ${LIBNAME}")
|
||||
EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-p ${${MYLIBRARY}} | grep ${LIBNAME}" OUTPUT_VARIABLE OBJDUMP_LIBRARY)
|
||||
IF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
||||
#MESSAGE(STATUS "${${MYLIBRARY}} references to ${LIBNAME}.")
|
||||
SET(${LIBRARY_FOUND} TRUE)
|
||||
ELSE(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
||||
#MESSAGE(STATUS "${${MYLIBRARY}} does not reference to ${LIBNAME}!")
|
||||
ENDIF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
||||
ENDIF(CMAKE_OBJDUMP)
|
||||
ENDIF(WIN32)
|
||||
|
@ -125,3 +135,4 @@ MACRO(LINK_DEPENDS LIBRARIES MYLIBRARY OTHERLIBRARY SYMBOL)
|
|||
SET(${OTHERLIBRARY}_LINKED TRUE)
|
||||
ENDIF(MUST_LINK)
|
||||
ENDMACRO(LINK_DEPENDS)
|
||||
|
||||
|
|
Loading…
Reference in a new issue