Skip to content

Commit

Permalink
build: disable tools test unless we have mkdwarfs, dwarfs{ck,extract}
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Aug 12, 2024
1 parent e3ff9b9 commit 5e27ce4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,16 @@ if(WITH_TESTS)
endif()

if(WITH_TOOLS OR WITH_FUSE_DRIVER)
list(APPEND DWARFS_TESTS
tools_test
)
if(NOT WITH_TOOLS)
find_program(MKDWARFS_EXE mkdwarfs mkdwarfs.exe)
find_program(DWARFSCK_EXE dwarfsck dwarfsck.exe)
find_program(DWARFSEXTRACT_EXE dwarfsextract dwarfsextract.exe)
endif()
if(WITH_TOOLS OR (MKDWARFS_EXE AND DWARFSCK_EXE AND DWARFSEXTRACT_EXE))
list(APPEND DWARFS_TESTS
tools_test
)
endif()
endif()

if((WITH_TOOLS OR WITH_FUSE_DRIVER) AND WITH_MAN_OPTION)
Expand Down Expand Up @@ -480,11 +487,6 @@ if(WITH_TESTS)
endif()

if(TARGET tools_test)
if(NOT WITH_TOOLS)
find_program(MKDWARFS_EXE mkdwarfs mkdwarfs.exe)
find_program(DWARFSCK_EXE dwarfsck dwarfsck.exe)
find_program(DWARFSEXTRACT_EXE dwarfsextract dwarfsextract.exe)
endif()
target_compile_definitions(tools_test PRIVATE
$<$<AND:$<BOOL:${WITH_UNIVERSAL_BINARY}>,$<BOOL:${WITH_TOOLS}>>:DWARFS_HAVE_UNIVERSAL_BINARY>
$<$<BOOL:${WITH_TOOLS}>:DWARFS_WITH_TOOLS>
Expand Down

0 comments on commit 5e27ce4

Please sign in to comment.