File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -572,9 +572,9 @@ else()
572
572
option (LLVM_ENABLE_THREADS "Use threads if available." ON )
573
573
endif ()
574
574
575
- set (LLVM_ENABLE_ICU "ON " CACHE STRING "Use ICU for character conversion support if available. Can be ON, OFF, or FORCE_ON" )
575
+ set (LLVM_ENABLE_ICU "OFF " CACHE STRING "Use ICU for character conversion support if available. Can be ON, OFF, or FORCE_ON" )
576
576
577
- set (LLVM_ENABLE_ICONV "ON " CACHE STRING "Use iconv for character conversion support if available. Can be ON, OFF, or FORCE_ON" )
577
+ set (LLVM_ENABLE_ICONV "OFF " CACHE STRING "Use iconv for character conversion support if available. Can be ON, OFF, or FORCE_ON" )
578
578
579
579
set (LLVM_ENABLE_ZLIB "ON" CACHE STRING "Use zlib for compression/decompression if available. Can be ON, OFF, or FORCE_ON" )
580
580
Original file line number Diff line number Diff line change @@ -294,8 +294,12 @@ if(LLVM_HAS_LOGF128)
294
294
set (LLVM_HAS_LOGF128 "${HAS_LOGF128} " )
295
295
endif ()
296
296
297
+ if (LLVM_ENABLE_ICU STREQUAL FORCE_ON AND LLVM_ENABLE_ICONV STREQUAL FORCE_ON )
298
+ message (FATAL_ERROR "Both LLVM_ENABLE_ICU and LLVM_ENABLE_ICONV should not be FORCE_ON" )
299
+ endif ()
300
+
297
301
# Check for ICU.
298
- if (LLVM_ENABLE_ICU )
302
+ if (LLVM_ENABLE_ICU AND NOT ( LLVM_ENABLE_ICONV STREQUAL FORCE_ON ) )
299
303
set (LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} )
300
304
set (CMAKE_FIND_LIBRARY_SUFFIXES ".so" )
301
305
if (LLVM_ENABLE_ICU STREQUAL FORCE_ON )
@@ -311,7 +315,7 @@ if(LLVM_ENABLE_ICU)
311
315
endif ()
312
316
313
317
# Check for builtin iconv to avoid licensing issues.
314
- if (LLVM_ENABLE_ICONV )
318
+ if (LLVM_ENABLE_ICONV AND NOT HAVE_ICU )
315
319
if (LLVM_ENABLE_ICONV STREQUAL FORCE_ON )
316
320
find_package (Iconv REQUIRED )
317
321
if (NOT Iconv_FOUND OR NOT Iconv_IS_BUILT_IN )
You can’t perform that action at this time.
0 commit comments