Skip to content

Commit

Permalink
build: Add requirements of gcc and clang versions
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
  • Loading branch information
cosmo0920 committed Oct 10, 2024
1 parent 0272a68 commit 1327d04
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,18 @@ endif()
if(FLB_UNICODE_ENCODER)
enable_language(CXX)
set (CMAKE_CXX_STANDARD 11)
add_subdirectory(${FLB_PATH_LIB_SIMDUTF} EXCLUDE_FROM_ALL)
FLB_DEFINITION(FLB_HAVE_UNICODE_ENCODER)
# The current minimum required gcc and clang versions are sited from
# https://github.com/fluent/fluent-bit/blob/master/.github/workflows/unit-tests.yaml.
# gcc version is 7.0 and clang version is 6.0 now.
if (MSVC OR
(CMAKE_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0) OR
(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0))
add_subdirectory(${FLB_PATH_LIB_SIMDUTF} EXCLUDE_FROM_ALL)
FLB_DEFINITION(FLB_HAVE_UNICODE_ENCODER)
else()
message(STATUS "${CMAKE_CXX_COMPILER} version: ${CMAKE_CXX_COMPILER_VERSION} is too old. Disabling simdutf library build.")
set (FLB_UNICODE_ENCODER Off)
endif()
endif()

# snappy
Expand Down

0 comments on commit 1327d04

Please sign in to comment.