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