diff --git a/CMakeLists.txt b/CMakeLists.txt index d10ec6a..db80f76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,13 @@ cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR) project(Dyninst-External-Tests) +# Not all systems have static libs (e.g., libc.a) +option( + DYNINST_DISABLE_STATIC_TESTS + "Disable building and executing statically-linked tests" + OFF +) + find_package(Dyninst 13.0.0 REQUIRED) enable_testing() diff --git a/dyninstAPI/CMakeLists.txt b/dyninstAPI/CMakeLists.txt index d3a5ad4..9fb0a00 100644 --- a/dyninstAPI/CMakeLists.txt +++ b/dyninstAPI/CMakeLists.txt @@ -7,4 +7,6 @@ target_link_libraries(dyninstAPI_insertion_operators add_executable(dyninstAPI_includes includes.cpp) target_link_libraries(dyninstAPI_includes PRIVATE Dyninst::dyninstAPI) -add_subdirectory(static_ctors_dtors) +if(NOT DYNINST_DISABLE_STATIC_TESTS) + add_subdirectory(static_ctors_dtors) +endif()