Skip to content

Commit

Permalink
Test and Enable OMNITRACE_BUILD_DYNINST, if needed
Browse files Browse the repository at this point in the history
Test `find_package(Dyninst)` and if it is not found, then
enable OMNITRACE_BUILD_DYNINST and
DYNINST_BUILD_{TBB,BOOST,ELFUTILS,LIBIBERTY}.

Signed-off-by: David Galiffi <[email protected]>
  • Loading branch information
dgaliffiAMD committed Sep 11, 2024
1 parent a9face6 commit 5b9d7bc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmake/Packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,23 @@ target_link_libraries(omnitrace-elfutils INTERFACE ${ElfUtils_LIBRARIES})
#
# ----------------------------------------------------------------------------------------#

if(NOT OMNITRACE_BUILD_DYNINST)
find_package(Dyninst QUIET
COMPONENTS dyninstAPI parseAPI instructionAPI symtabAPI)
if (NOT Dyninst_FOUND)
# Build DYNINST,TBB,BOOST,ELFUTILS,LIBIBERTY
message(WARNING
"Dyninst not found. Building Dyninst and dependencies from source.")

set(OMNITRACE_BUILD_DYNINST ON)
set(DYNINST_BUILD_TBB ON)
set(DYNINST_BUILD_BOOST ON)
set(DYNINST_BUILD_ELFUTILS ON)
set(DYNINST_BUILD_LIBIBERTY ON)

endif()
endif()

if(OMNITRACE_BUILD_DYNINST)
omnitrace_checkout_git_submodule(
RELATIVE_PATH external/dyninst
Expand Down

0 comments on commit 5b9d7bc

Please sign in to comment.