File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -259,22 +259,28 @@ endif()
259259
260260#Check for icu.
261261if (LLVM_ENABLE_ICU)
262- find_package (ICU COMPONENTS uc i18n)
263- if (ICU_FOUND)
264- set (HAVE_ICU 1)
262+ if (LLVM_ENABLE_ICU STREQUAL FORCE_ON)
263+ find_package (ICU REQUIRED COMPONENTS uc i18n)
264+ if (NOT ICU_FOUND)
265+ message (FATAL_ERROR "Failed to configure icu, but LLVM_ENABLE_ICU is FORCE_ON" )
266+ endif ()
265267 else ()
266- set (HAVE_ICU 0 )
268+ find_package (ICU COMPONENTS uc i18n )
267269 endif ()
270+ set (HAVE_ICU ${ICU_FOUND} )
268271endif ()
269272
270273# Check for iconv.
271274if (LLVM_ENABLE_ICONV)
272- find_package (Iconv)
273- if (Iconv_FOUND)
274- set (HAVE_ICONV 1)
275+ if (LLVM_ENABLE_ICONV STREQUAL FORCE_ON)
276+ find_package (Iconv REQUIRED)
277+ if (NOT Iconv_FOUND)
278+ message (FATAL_ERROR "Failed to configure iconv, but LLVM_ENABLE_ICONV is FORCE_ON" )
279+ endif ()
275280 else ()
276- set (HAVE_ICONV 0 )
281+ find_package (Iconv )
277282 endif ()
283+ set (HAVE_ICONV ${Iconv_FOUND} )
278284endif ()
279285
280286# function checks
You can’t perform that action at this time.
0 commit comments