Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ endif()

project(Dyninst-TestSuite)

option(DYNINST_ENABLE_32BIT_TESTS "Enable 32-bit tests" OFF)

list(INSERT CMAKE_MODULE_PATH 0
"${PROJECT_SOURCE_DIR}/cmake"
"${PROJECT_SOURCE_DIR}/cmake/Modules"
Expand Down Expand Up @@ -289,7 +291,11 @@ install(TARGETS testA
RUNTIME DESTINATION ${INSTALL_DIR}
ARCHIVE DESTINATION ${INSTALL_DIR})

if(UNIX)
if(DYNINST_ENABLE_32BIT_TESTS)
if(NOT TARGET Dyninst::dyninstAPI_RT_m32)
message(FATAL_ERROR "32-bit tests require the 32-bit Dyninst runtime")
endif()

check_mutatee_compiler(${M_gnu_cc} "-m32" "-m32" C "" m32_works)
if(${m32_works})
message(STATUS "Building 32-bit helper libraries")
Expand Down
4 changes: 4 additions & 0 deletions checkMutateeCompiler.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

MACRO (CHECK_MUTATEE_COMPILER _COMPILER _COMP_FLAG _LINK_FLAG _LANG _MSG _RESULT)
if(NOT DYNINST_ENABLE_32BIT_TESTS)
set(${_RESULT} 0 CACHE INTERNAL "Test ${VAR}")
endif()

if (NOT DEFINED ${_RESULT})
set(COMPILER_RESULT 0)
set(COMPILER_OUTPUT "")
Expand Down