Skip to content

Commit

Permalink
Excluded test tool from shared library builds (Fixes #415)
Browse files Browse the repository at this point in the history
  • Loading branch information
mappzor authored and athre0z committed Feb 11, 2023
1 parent 8948d9a commit 553ee69
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 @@ -383,14 +383,16 @@ if (ZYDIS_BUILD_TOOLS AND NOT ZYAN_NO_LIBC)
target_compile_definitions("ZydisFuzzReEncoding" PRIVATE "ZYDIS_LIBFUZZER")
endif ()

add_executable("ZydisTestEncoderAbsolute"
"tools/ZydisTestEncoderAbsolute.c")
target_link_libraries("ZydisTestEncoderAbsolute" "Zydis")
set_target_properties("ZydisTestEncoderAbsolute" PROPERTIES FOLDER "Tools")
target_compile_definitions("ZydisTestEncoderAbsolute" PRIVATE "_CRT_SECURE_NO_WARNINGS")
zyan_set_common_flags("ZydisTestEncoderAbsolute")
zyan_maybe_enable_wpo("ZydisTestEncoderAbsolute")
_maybe_set_emscripten_cfg("ZydisTestEncoderAbsolute")
if (NOT ZYDIS_BUILD_SHARED_LIB)
add_executable("ZydisTestEncoderAbsolute"
"tools/ZydisTestEncoderAbsolute.c")
target_link_libraries("ZydisTestEncoderAbsolute" "Zydis")
set_target_properties("ZydisTestEncoderAbsolute" PROPERTIES FOLDER "Tools")
target_compile_definitions("ZydisTestEncoderAbsolute" PRIVATE "_CRT_SECURE_NO_WARNINGS")
zyan_set_common_flags("ZydisTestEncoderAbsolute")
zyan_maybe_enable_wpo("ZydisTestEncoderAbsolute")
_maybe_set_emscripten_cfg("ZydisTestEncoderAbsolute")
endif ()
endif ()

add_executable("ZydisInfo" "tools/ZydisInfo.c")
Expand Down

0 comments on commit 553ee69

Please sign in to comment.