Skip to content

Commit

Permalink
Add option to disable static tests (#26)
Browse files Browse the repository at this point in the history
Not all systems have static libraries (e.g., libc.a).
  • Loading branch information
hainest authored Mar 11, 2024
1 parent 2fe829b commit e66b37b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
4 changes: 3 additions & 1 deletion dyninstAPI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit e66b37b

Please sign in to comment.