File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -132,12 +132,14 @@ include(CheckLanguage)
132132check_language(CXX)
133133
134134# Enable CXX features if CXX is available
135- if (CMAKE_CXX_COMPILER)
136- message (STATUS "CXX compiler found, enable simdutf." )
137- set (FLB_USE_SIMDUTF Yes )
138- else ()
139- message (STATUS "CXX compiler not found, disable simdutf." )
140- set (FLB_USE_SIMDUTF No )
135+ if (NOT DEFINED FLB_USE_SIMDUTF)
136+ if (CMAKE_CXX_COMPILER)
137+ message (STATUS "CXX compiler found, enable simdutf." )
138+ set (FLB_USE_SIMDUTF Yes )
139+ else ()
140+ message (STATUS "CXX compiler not found, disable simdutf." )
141+ set (FLB_USE_SIMDUTF No )
142+ endif ()
141143endif ()
142144
143145# Output paths
@@ -597,7 +599,7 @@ if(FLB_UTF8_ENCODER)
597599endif ()
598600
599601# simdutf
600- if (FLB_UNICODE_ENCODER)
602+ if (FLB_UNICODE_ENCODER AND FLB_USE_SIMDUTF )
601603 enable_language (CXX)
602604 set (CMAKE_CXX_STANDARD 11)
603605 add_subdirectory (${FLB_PATH_LIB_SIMDUTF} EXCLUDE_FROM_ALL )
You can’t perform that action at this time.
0 commit comments