[client,common] deactivate -fsanitize with helper

when compiling manpage generation helper deactivate -fsanitize options
to avoid link/runtime issues.
This commit is contained in:
akallabeth
2024-12-09 07:30:27 +01:00
parent 0e37e50454
commit 285a6961fa

View File

@@ -5,10 +5,14 @@ else()
add_executable(generate_argument_manpage generate_argument_manpage.c ../cmdline.h)
# Ensure we build with host compiler and no compile/link flags used by other modules.
set_target_properties(
generate_argument_manpage PROPERTIES COMPILE_OPTIONS "" LINK_OPTIONS "" STATIC_LIBRARY_OPTIONS ""
)
include(CompilerDetect)
if(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)
target_compile_options(generate_argument_manpage PRIVATE -fno-sanitize=all)
target_compile_options(generate_argument_manpage PRIVATE -fno-sanitize=all)
target_link_options(generate_argument_manpage PRIVATE -fno-sanitize=all)
target_link_options(generate_argument_manpage PRIVATE -fno-sanitize=all)
endif()
export(TARGETS generate_argument_manpage FILE "${CMAKE_BINARY_DIR}/GenerateArgumentManpageConfig.cmake")
endif()