File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
MultiSource/Applications/ClamAV Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -178,9 +178,15 @@ if(TARGET_OS STREQUAL "Linux")
178178 find_package (Intl REQUIRED)
179179 target_link_libraries (clamscan ${Intl_LIBRARIES} )
180180endif ()
181- # zlib fails to build with correctly defined target OS macros.
182- # (https://github.com/madler/zlib/pull/895)
183- # Disable the compiler extension to workaround the build failure until a zlib
184- # source update with the fix.
185- target_compile_options (clamscan PRIVATE -fno-define-target -os-macros )
181+
182+ include (CheckCCompilerFlag)
183+ check_c_compiler_flag(-fno-define-target -os-macros
184+ COMPILER_HAS_NO_DEFINE_TARGET_OS_MACROS)
185+ if (COMPILER_HAS_NO_DEFINE_TARGET_OS_MACROS)
186+ # zlib fails to build with correctly defined target OS macros.
187+ # (https://github.com/madler/zlib/pull/895)
188+ # Disable the compiler extension to workaround the build failure until a zlib
189+ # source update with the fix.
190+ target_compile_options (clamscan PRIVATE -fno-define-target -os-macros )
191+ endif ()
186192llvm_test_data(clamscan ${INPUT} dbdir)
You can’t perform that action at this time.
0 commit comments