fixup! Restrict the flags to CLang only

This commit is contained in:
Xiaoge Su 2022-09-28 19:15:35 -07:00
parent c3e84f4e8f
commit 8868201ff9
1 changed files with 6 additions and 3 deletions

View File

@ -15,9 +15,12 @@ function(compile_zstd)
FetchContent_Populate(ZSTD)
add_subdirectory(${zstd_SOURCE_DIR}/build/cmake ${zstd_BINARY_DIR})
target_compile_options(zstd PRIVATE -Wno-array-bounds -Wno-tautological-compare)
target_compile_options(libzstd_static PRIVATE -Wno-array-bounds -Wno-tautological-compare)
target_compile_options(zstd-frugal PRIVATE -Wno-array-bounds -Wno-tautological-compare)
if (CLANG)
target_compile_options(zstd PRIVATE -Wno-array-bounds -Wno-tautological-compare)
target_compile_options(libzstd_static PRIVATE -Wno-array-bounds -Wno-tautological-compare)
target_compile_options(zstd-frugal PRIVATE -Wno-array-bounds -Wno-tautological-compare)
endif()
endif()
set(ZSTD_LIB_INCLUDE_DIR ${zstd_SOURCE_DIR}/lib PARENT_SCOPE)