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)
132
132
check_language (CXX )
133
133
134
134
# 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 ()
141
143
endif ()
142
144
143
145
# Output paths
@@ -597,7 +599,7 @@ if(FLB_UTF8_ENCODER)
597
599
endif ()
598
600
599
601
# simdutf
600
- if (FLB_UNICODE_ENCODER )
602
+ if (FLB_UNICODE_ENCODER AND FLB_USE_SIMDUTF )
601
603
enable_language (CXX )
602
604
set (CMAKE_CXX_STANDARD 11 )
603
605
add_subdirectory (${FLB_PATH_LIB_SIMDUTF} EXCLUDE_FROM_ALL )
You can’t perform that action at this time.
0 commit comments