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()
572572 option (LLVM_ENABLE_THREADS "Use threads if available." ON )
573573endif ()
574574
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" )
576576
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" )
578578
579579set (LLVM_ENABLE_ZLIB "ON" CACHE STRING "Use zlib for compression/decompression if available. Can be ON, OFF, or FORCE_ON" )
580580
Original file line number Diff line number Diff line change @@ -294,8 +294,12 @@ if(LLVM_HAS_LOGF128)
294294 set (LLVM_HAS_LOGF128 "${HAS_LOGF128} " )
295295endif ()
296296
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+
297301# Check for ICU.
298- if (LLVM_ENABLE_ICU)
302+ if (LLVM_ENABLE_ICU AND NOT (LLVM_ENABLE_ICONV STREQUAL FORCE_ON) )
299303 set (LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} )
300304 set (CMAKE_FIND_LIBRARY_SUFFIXES ".so" )
301305 if (LLVM_ENABLE_ICU STREQUAL FORCE_ON)
@@ -311,7 +315,7 @@ if(LLVM_ENABLE_ICU)
311315endif ()
312316
313317# Check for builtin iconv to avoid licensing issues.
314- if (LLVM_ENABLE_ICONV)
318+ if (LLVM_ENABLE_ICONV AND NOT HAVE_ICU )
315319 if (LLVM_ENABLE_ICONV STREQUAL FORCE_ON)
316320 find_package (Iconv REQUIRED)
317321 if (NOT Iconv_FOUND OR NOT Iconv_IS_BUILT_IN)
You can’t perform that action at this time.
0 commit comments