ICU-7747 CMake port

This commit is contained in:
Clemens Wasser 2022-08-14 22:15:25 +02:00
parent 95d905a9e9
commit cf8581f338
35 changed files with 1001 additions and 1 deletions

View file

@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.16)
project(icu4c)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
add_library(icu_defaults INTERFACE)
target_compile_definitions(icu_defaults INTERFACE U_ATTRIBUTE_DEPRECATED=)
if(WIN32)
target_compile_definitions(icu_defaults INTERFACE
$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:U_STATIC_IMPLEMENTATION>
WIN64
WIN32
WINVER=0x0601
_WIN32_WINNT=0x0601
_CRT_SECURE_NO_DEPRECATE
_MBCS
_HAS_EXCEPTIONS=0
$<$<CONFIG:Debug>:_DEBUG>)
else()
target_compile_definitions(icu_defaults INTERFACE
_REENTRANT U_HAVE_ELF_H=1 U_HAVE_STRTOD_L=1 U_HAVE_XLOCALE_H=0)
endif()
if(MSVC)
target_compile_options(icu_defaults INTERFACE /utf-8)
endif()
add_library(icu_lib_defaults INTERFACE)
target_link_libraries(icu_lib_defaults INTERFACE icu_defaults)
if(WIN32)
target_compile_definitions(icu_lib_defaults INTERFACE _HAS_EXCEPTIONS=0)
endif()
add_subdirectory(common)
add_subdirectory(i18n)
add_subdirectory(io)
add_subdirectory(tools)
add_subdirectory(stubdata)
include(CTest)
if(BUILD_TESTING)
add_test(NAME icuinfo COMMAND icuinfo WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_subdirectory(test)
endif()

View file

@ -0,0 +1,208 @@
add_library(icuuc)
target_link_libraries(icuuc PRIVATE icu_defaults icu_lib_defaults icudt)
target_include_directories(icuuc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(icuuc PRIVATE U_COMMON_IMPLEMENTATION)
if(WIN32)
target_compile_definitions(icuuc PRIVATE $<$<CONFIG:Debug>:RBBI_DEBUG> U_PLATFORM_USES_ONLY_WIN32_API=1)
endif()
target_sources(icuuc PRIVATE
appendable.cpp
bmpset.cpp
brkeng.cpp
brkiter.cpp
bytesinkutil.cpp
bytestream.cpp
bytestrie.cpp
bytestriebuilder.cpp
bytestrieiterator.cpp
caniter.cpp
characterproperties.cpp
chariter.cpp
charstr.cpp
cmemory.cpp
cstr.cpp
cstring.cpp
cwchar.cpp
dictbe.cpp
dictionarydata.cpp
dtintrv.cpp
edits.cpp
emojiprops.cpp
errorcode.cpp
filteredbrk.cpp
filterednormalizer2.cpp
icudataver.cpp
icuplug.cpp
loadednormalizer2impl.cpp
localebuilder.cpp
localematcher.cpp
localeprioritylist.cpp
locavailable.cpp
locbased.cpp
locdispnames.cpp
locdistance.cpp
locdspnm.cpp
locid.cpp
loclikely.cpp
loclikelysubtags.cpp
locmap.cpp
locresdata.cpp
locutil.cpp
lsr.cpp
lstmbe.cpp
messagepattern.cpp
normalizer2.cpp
normalizer2impl.cpp
normlzr.cpp
parsepos.cpp
patternprops.cpp
pluralmap.cpp
propname.cpp
propsvec.cpp
punycode.cpp
putil.cpp
rbbi.cpp
rbbi_cache.cpp
rbbidata.cpp
rbbinode.cpp
rbbirb.cpp
rbbiscan.cpp
rbbisetb.cpp
rbbistbl.cpp
rbbitblb.cpp
resbund.cpp
resbund_cnv.cpp
resource.cpp
restrace.cpp
ruleiter.cpp
schriter.cpp
serv.cpp
servlk.cpp
servlkf.cpp
servls.cpp
servnotf.cpp
servrbf.cpp
servslkf.cpp
sharedobject.cpp
simpleformatter.cpp
static_unicode_sets.cpp
stringpiece.cpp
stringtriebuilder.cpp
uarrsort.cpp
ubidi.cpp
ubidi_props.cpp
ubidiln.cpp
ubiditransform.cpp
ubidiwrt.cpp
ubrk.cpp
ucase.cpp
ucasemap.cpp
ucasemap_titlecase_brkiter.cpp
ucat.cpp
uchar.cpp
ucharstrie.cpp
ucharstriebuilder.cpp
ucharstrieiterator.cpp
uchriter.cpp
ucln_cmn.cpp
ucmndata.cpp
ucnv.cpp
ucnv2022.cpp
ucnv_bld.cpp
ucnv_cb.cpp
ucnv_cnv.cpp
ucnv_ct.cpp
ucnv_err.cpp
ucnv_ext.cpp
ucnv_io.cpp
ucnv_lmb.cpp
ucnv_set.cpp
ucnv_u16.cpp
ucnv_u32.cpp
ucnv_u7.cpp
ucnv_u8.cpp
ucnvbocu.cpp
ucnvdisp.cpp
ucnvhz.cpp
ucnvisci.cpp
ucnvlat1.cpp
ucnvmbcs.cpp
ucnvscsu.cpp
ucnvsel.cpp
ucol_swp.cpp
ucptrie.cpp
ucurr.cpp
udata.cpp
udatamem.cpp
udataswp.cpp
uenum.cpp
uhash.cpp
uhash_us.cpp
uidna.cpp
uinit.cpp
uinvchar.cpp
uiter.cpp
ulist.cpp
uloc.cpp
uloc_keytype.cpp
uloc_tag.cpp
umapfile.cpp
umath.cpp
umutablecptrie.cpp
umutex.cpp
unames.cpp
unifiedcache.cpp
unifilt.cpp
unifunct.cpp
uniset.cpp
uniset_closure.cpp
uniset_props.cpp
unisetspan.cpp
unistr.cpp
unistr_case.cpp
unistr_case_locale.cpp
unistr_cnv.cpp
unistr_props.cpp
unistr_titlecase_brkiter.cpp
unorm.cpp
unormcmp.cpp
uobject.cpp
uprops.cpp
ures_cnv.cpp
uresbund.cpp
uresdata.cpp
usc_impl.cpp
uscript.cpp
uscript_props.cpp
uset.cpp
uset_props.cpp
usetiter.cpp
ushape.cpp
usprep.cpp
ustack.cpp
ustr_cnv.cpp
ustr_titlecase_brkiter.cpp
ustr_wcs.cpp
ustrcase.cpp
ustrcase_locale.cpp
ustrenum.cpp
ustrfmt.cpp
ustring.cpp
ustrtrns.cpp
utext.cpp
utf_impl.cpp
util.cpp
util_props.cpp
utrace.cpp
utrie.cpp
utrie2.cpp
utrie2_builder.cpp
utrie_swap.cpp
uts46.cpp
utypes.cpp
uvector.cpp
uvectr32.cpp
uvectr64.cpp
wintz.cpp)

View file

@ -284,7 +284,13 @@ ICU_DATA_BUILD_VERBOSE=
# Three main targets: tools, core data, and test data.
# Keep track of whether they are built via timestamp files.
$(TOOLS_TS): "$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb.exe" "$(ICUTOOLS)\gencnval\$(CFGTOOLS)\gencnval.exe" "$(ICUTOOLS)\gencfu\$(CFGTOOLS)\gencfu.exe" "$(ICUTOOLS)\icupkg\$(CFGTOOLS)\icupkg.exe" "$(ICUTOOLS)\makeconv\$(CFGTOOLS)\makeconv.exe" "$(ICUPBIN)\pkgdata.exe"
GENRB_DIR=$(ICUTOOLS)\genrb\$(CFGTOOLS)
GENCNVAL_DIR=$(ICUTOOLS)\gencnval\$(CFGTOOLS)
GENCFU_DIR=$(ICUTOOLS)\gencfu\$(CFGTOOLS)
ICUPKG_DIR=$(ICUTOOLS)\icupkg\$(CFGTOOLS)
MAKECONV_DIR=$(ICUTOOLS)\makeconv\$(CFGTOOLS)
$(TOOLS_TS): "$(GENRB_DIR)\genrb.exe" "$(GENCNVAL_DIR)\gencnval.exe" "$(GENCFU_DIR)\gencfu.exe" "$(ICUPKG_DIR)\icupkg.exe" "$(MAKECONV_DIR)\makeconv.exe" "$(ICUPBIN)\pkgdata.exe"
@echo "timestamp" > $(TOOLS_TS)
# On Unix, Python generates at configure time a list of Makefile rules.

View file

@ -0,0 +1,246 @@
add_library(icui18n)
target_link_libraries(icui18n PRIVATE icu_lib_defaults icuuc)
target_compile_definitions(icui18n PRIVATE U_I18N_IMPLEMENTATION)
target_include_directories(icui18n PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(icui18n PRIVATE
alphaindex.cpp
anytrans.cpp
astro.cpp
basictz.cpp
bocsu.cpp
brktrans.cpp
buddhcal.cpp
calendar.cpp
casetrn.cpp
cecal.cpp
chnsecal.cpp
choicfmt.cpp
coleitr.cpp
coll.cpp
collation.cpp
collationbuilder.cpp
collationcompare.cpp
collationdata.cpp
collationdatabuilder.cpp
collationdatareader.cpp
collationdatawriter.cpp
collationfastlatin.cpp
collationfastlatinbuilder.cpp
collationfcd.cpp
collationiterator.cpp
collationkeys.cpp
collationroot.cpp
collationrootelements.cpp
collationruleparser.cpp
collationsets.cpp
collationsettings.cpp
collationtailoring.cpp
collationweights.cpp
compactdecimalformat.cpp
coptccal.cpp
cpdtrans.cpp
csdetect.cpp
csmatch.cpp
csr2022.cpp
csrecog.cpp
csrmbcs.cpp
csrsbcs.cpp
csrucode.cpp
csrutf8.cpp
curramt.cpp
currfmt.cpp
currpinf.cpp
currunit.cpp
dangical.cpp
datefmt.cpp
dayperiodrules.cpp
dcfmtsym.cpp
decContext.cpp
decNumber.cpp
decimfmt.cpp
displayoptions.cpp
double-conversion-bignum-dtoa.cpp
double-conversion-bignum.cpp
double-conversion-cached-powers.cpp
double-conversion-double-to-string.cpp
double-conversion-fast-dtoa.cpp
double-conversion-string-to-double.cpp
double-conversion-strtod.cpp
dtfmtsym.cpp
dtitvfmt.cpp
dtitvinf.cpp
dtptngen.cpp
dtrule.cpp
erarules.cpp
esctrn.cpp
ethpccal.cpp
fmtable.cpp
fmtable_cnv.cpp
format.cpp
formatted_string_builder.cpp
formattedval_iterimpl.cpp
formattedval_sbimpl.cpp
formattedvalue.cpp
fphdlimp.cpp
fpositer.cpp
funcrepl.cpp
gender.cpp
gregocal.cpp
gregoimp.cpp
hebrwcal.cpp
indiancal.cpp
inputext.cpp
islamcal.cpp
japancal.cpp
listformatter.cpp
measfmt.cpp
measunit.cpp
measunit_extra.cpp
measure.cpp
msgfmt.cpp
name2uni.cpp
nfrs.cpp
nfrule.cpp
nfsubs.cpp
nortrans.cpp
nultrans.cpp
number_affixutils.cpp
number_asformat.cpp
number_capi.cpp
number_compact.cpp
number_currencysymbols.cpp
number_decimalquantity.cpp
number_decimfmtprops.cpp
number_fluent.cpp
number_formatimpl.cpp
number_grouping.cpp
number_integerwidth.cpp
number_longnames.cpp
number_mapper.cpp
number_modifiers.cpp
number_multiplier.cpp
number_notation.cpp
number_output.cpp
number_padding.cpp
number_patternmodifier.cpp
number_patternstring.cpp
number_rounding.cpp
number_scientific.cpp
number_skeletons.cpp
number_symbolswrapper.cpp
number_usageprefs.cpp
number_utils.cpp
numfmt.cpp
numparse_affixes.cpp
numparse_compositions.cpp
numparse_currency.cpp
numparse_decimal.cpp
numparse_impl.cpp
numparse_parsednumber.cpp
numparse_scientific.cpp
numparse_symbols.cpp
numparse_validators.cpp
numrange_capi.cpp
numrange_fluent.cpp
numrange_impl.cpp
numsys.cpp
olsontz.cpp
persncal.cpp
pluralranges.cpp
plurfmt.cpp
plurrule.cpp
quant.cpp
quantityformatter.cpp
rbnf.cpp
rbt.cpp
rbt_data.cpp
rbt_pars.cpp
rbt_rule.cpp
rbt_set.cpp
rbtz.cpp
regexcmp.cpp
regeximp.cpp
regexst.cpp
regextxt.cpp
region.cpp
reldatefmt.cpp
reldtfmt.cpp
rematch.cpp
remtrans.cpp
repattrn.cpp
rulebasedcollator.cpp
scientificnumberformatter.cpp
scriptset.cpp
search.cpp
selfmt.cpp
sharedbreakiterator.cpp
simpletz.cpp
smpdtfmt.cpp
smpdtfst.cpp
sortkey.cpp
standardplural.cpp
string_segment.cpp
strmatch.cpp
strrepl.cpp
stsearch.cpp
taiwncal.cpp
timezone.cpp
titletrn.cpp
tmunit.cpp
tmutamt.cpp
tmutfmt.cpp
tolowtrn.cpp
toupptrn.cpp
translit.cpp
transreg.cpp
tridpars.cpp
tzfmt.cpp
tzgnames.cpp
tznames.cpp
tznames_impl.cpp
tzrule.cpp
tztrans.cpp
ucal.cpp
ucln_in.cpp
ucol.cpp
ucol_res.cpp
ucol_sit.cpp
ucoleitr.cpp
ucsdet.cpp
udat.cpp
udateintervalformat.cpp
udatpg.cpp
ufieldpositer.cpp
uitercollationiterator.cpp
ulistformatter.cpp
ulocdata.cpp
umsg.cpp
unesctrn.cpp
uni2name.cpp
units_data.cpp
units_complexconverter.cpp
units_converter.cpp
units_router.cpp
unum.cpp
unumsys.cpp
upluralrules.cpp
uregex.cpp
uregexc.cpp
uregion.cpp
usearch.cpp
uspoof.cpp
uspoof_build.cpp
uspoof_conf.cpp
uspoof_impl.cpp
utf16collationiterator.cpp
utf8collationiterator.cpp
utmscale.cpp
utrans.cpp
vtzone.cpp
vzone.cpp
windtfmt.cpp
winnmfmt.cpp
wintzimpl.cpp
zonemeta.cpp
zrule.cpp
ztrans.cpp)

View file

@ -0,0 +1,17 @@
add_library(icuio)
target_link_libraries(icuio PRIVATE icu_lib_defaults icuuc icui18n)
target_compile_definitions(icuio PRIVATE U_IO_IMPLEMENTATION)
target_include_directories(icuio PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(icuio PRIVATE
locbund.cpp
sprintf.cpp
sscanf.cpp
ucln_io.cpp
ufile.cpp
ufmt_cmn.cpp
uprintf.cpp
uprntf_p.cpp
uscanf.cpp
uscanf_p.cpp
ustdio.cpp
ustream.cpp)

View file

@ -0,0 +1,9 @@
add_library(icudt stubdata.cpp)
target_link_libraries(icudt PRIVATE icu_lib_defaults icuuc)
target_compile_definitions(icudt PRIVATE U_COMMON_IMPLEMENTATION)
add_custom_command(
TARGET icudt POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "File with stubdata build time, used as a dependency to trigger fresh data build, since stubdata dll will overwrite the real one." > "${CMAKE_CURRENT_LIST_DIR}/stubdatabuilt.txt"
WORKING_DIRECTORY ${icu4c_SOURCE_DIR}/extra/uconv
VERBATIM)

View file

@ -0,0 +1,8 @@
add_subdirectory(cintltst)
add_subdirectory(compat)
add_subdirectory(fuzzer)
add_subdirectory(intltest)
add_subdirectory(iotest)
#add_subdirectory(letest)
add_subdirectory(testmap)
#add_subdirectory(thaitest)

View file

@ -0,0 +1,96 @@
add_executable(cintltst)
target_link_libraries(cintltst PRIVATE icu_defaults icuuc ctestfw icui18n toolutil)
if(BUILD_TESTING)
add_test(NAME cintltst COMMAND cintltst WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
target_sources(cintltst PRIVATE
bocu1tst.c
callcoll.c
calltest.c
capitst.c
cbiapts.c
cbididat.c
cbiditransformtst.c
cbiditst.c
cbkittst.c
ccaltst.c
ccapitst.c
ccolltst.c
cconvtst.c
cctest.c
ccurrtst.c
cdateintervalformattest.c
cdattst.c
cdetst.c
cdtdptst.c
cdtrgtst.c
cestst.c
cfintst.c
cformtst.c
cfrtst.c
cg7coll.c
cgendtst.c
chashtst.c
cintltst.c
citertst.c
cjaptst.c
cldrtest.c
cloctst.c
cmsccoll.c
cmsgtst.c
cnmdptst.c
cnormtst.c
cnumtst.c
cpluralrulestest.c
cposxtst.c
crelativedateformattest.c
crestst.c
creststn.c
cstrcase.c
cstrtest.c
cturtst.c
cucdapi.c
cucdtst.c
currtest.c
custrtrn.c
custrtst.c
cutiltst.c
encoll.c
eurocreg.c
hpmufn.c
idnatest.c
nccbtst.c
ncnvfbts.c
ncnvtst.c
nfsprep.c
nucnvtst.c
putiltst.c
reapits.c
sorttest.c
spooftest.c
spreptst.c
sprpdata.c
stdnmtst.c
tracetst.c
trie2test.c
trietest.c
ucnvseltst.c
ucptrietest.c
ucsdetst.c
udatatst.c
udatpg_test.c
uenumtst.c
uformattedvaluetst.c
ulistfmttest.c
unumberformattertst.c
unumberrangeformattertst.c
uregiontest.c
usettest.c
usrchtst.c
utexttst.c
utf16tst.c
utf8tst.c
utmstest.c
utransts.c)

View file

@ -0,0 +1,2 @@
add_executable(compat tzdate.c)
target_link_libraries(compat PRIVATE icu_defaults icuuc icui18n)

View file

@ -0,0 +1,22 @@
add_library(fuzzer fuzzer_driver.cpp locale_util.cpp)
target_link_libraries(fuzzer PRIVATE icu_defaults icuuc)
function(add_fuzzer fuzzer_name)
add_executable(${fuzzer_name} ${fuzzer_name}.cpp)
target_link_libraries(${fuzzer_name} PRIVATE icu_defaults icuuc icui18n fuzzer)
endfunction()
add_fuzzer(break_iterator_fuzzer)
add_fuzzer(collator_compare_fuzzer)
add_fuzzer(collator_rulebased_fuzzer)
add_fuzzer(converter_fuzzer)
add_fuzzer(locale_fuzzer)
add_fuzzer(number_format_fuzzer)
add_fuzzer(ucasemap_fuzzer)
add_fuzzer(uloc_canonicalize_fuzzer)
add_fuzzer(uloc_for_language_tag_fuzzer)
add_fuzzer(uloc_get_name_fuzzer)
add_fuzzer(uloc_is_right_to_left_fuzzer)
add_fuzzer(uloc_open_keywords_fuzzer)
add_fuzzer(unicode_string_codepage_create_fuzzer)
add_fuzzer(uregex_open_fuzzer)

View file

@ -0,0 +1,176 @@
add_executable(intltest)
target_link_libraries(intltest PRIVATE icu_defaults ctestfw icuuc icui18n toolutil)
if(BUILD_TESTING)
add_test(NAME intltest COMMAND intltest WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
target_sources(intltest PRIVATE
aliastst.cpp
allcoll.cpp
alphaindextst.cpp
apicoll.cpp
astrotst.cpp
bidiconf.cpp
bytestrietest.cpp
calcasts.cpp
callimts.cpp
calregts.cpp
caltest.cpp
caltztst.cpp
canittst.cpp
citrtest.cpp
collationtest.cpp
colldata.cpp
compactdecimalformattest.cpp
convtest.cpp
cpdtrtst.cpp
csdetest.cpp
currcoll.cpp
dadrcal.cpp
dadrfmt.cpp
datadrivennumberformattestsuite.cpp
dcfmapts.cpp
dcfmtest.cpp
decoll.cpp
displayoptions_test.cpp
dtfmapts.cpp
dtfmrgts.cpp
dtfmtrtts.cpp
dtfmttst.cpp
dtifmtts.cpp
dtptngts.cpp
encoll.cpp
erarulestest.cpp
escoll.cpp
ficoll.cpp
fldset.cpp
formatted_string_builder_test.cpp
formattedvaluetest.cpp
frcoll.cpp
g7coll.cpp
genderinfotest.cpp
icusvtst.cpp
idnaconf.cpp
idnaref.cpp
incaltst.cpp
intltest.cpp
itercoll.cpp
itformat.cpp
itmajor.cpp
itrbbi.cpp
itrbnf.cpp
itrbnfp.cpp
itrbnfrt.cpp
itspoof.cpp
ittrans.cpp
itutil.cpp
jacoll.cpp
jamotest.cpp
lcukocol.cpp
listformattertest.cpp
localebuildertest.cpp
localematchertest.cpp
locnmtst.cpp
loctest.cpp
lstmbetst.cpp
measfmttest.cpp
miscdtfm.cpp
mnkytst.cpp
msfmrgts.cpp
nmfmapts.cpp
nmfmtrt.cpp
normconf.cpp
nptrans.cpp
numberformattesttuple.cpp
numbertest_affixutils.cpp
numbertest_api.cpp
numbertest_decimalquantity.cpp
numbertest_doubleconversion.cpp
numbertest_modifiers.cpp
numbertest_parse.cpp
numbertest_patternmodifier.cpp
numbertest_patternstring.cpp
numbertest_permutation.cpp
numbertest_range.cpp
numbertest_skeletons.cpp
numfmtdatadriventest.cpp
numfmtspectest.cpp
numfmtst.cpp
numrgts.cpp
pluralmaptest.cpp
plurfmts.cpp
plurults.cpp
pptest.cpp
punyref.cpp
quantityformattertest.cpp
rbbiapts.cpp
rbbimonkeytest.cpp
rbbitst.cpp
regcoll.cpp
regextst.cpp
regiontst.cpp
reldatefmttest.cpp
reptest.cpp
restest.cpp
restsnew.cpp
scientificnumberformattertest.cpp
sdtfmtts.cpp
selfmts.cpp
sfwdchit.cpp
simpleformattertest.cpp
simplethread.cpp
srchtest.cpp
ssearch.cpp
static_unisets_test.cpp
strcase.cpp
string_segment_test.cpp
strtest.cpp
svccoll.cpp
tchcfmt.cpp
testidn.cpp
testidna.cpp
testutil.cpp
textfile.cpp
tfsmalls.cpp
thcoll.cpp
tmsgfmt.cpp
tokiter.cpp
transapi.cpp
transrt.cpp
transtst.cpp
trcoll.cpp
trnserr.cpp
tscoll.cpp
tsdate.cpp
tsdcfmsy.cpp
tsdtfmsy.cpp
tsmthred.cpp
tsnmfmt.cpp
tsputil.cpp
tstnorm.cpp
tstnrapi.cpp
tufmtts.cpp
tzbdtest.cpp
tzfmttst.cpp
tzoffloc.cpp
tzregts.cpp
tzrulets.cpp
tztest.cpp
ucaconf.cpp
ucdtest.cpp
ucharstrietest.cpp
unifiedcachetest.cpp
units_data_test.cpp
units_router_test.cpp
units_test.cpp
uobjtest.cpp
usettest.cpp
ustrtest.cpp
uts46test.cpp
utxttest.cpp
uvectest.cpp
v32test.cpp
windttst.cpp
winnmtst.cpp
winutil.cpp)

View file

@ -0,0 +1,6 @@
add_executable(iotest filetst.c iotest.cpp stream.cpp strtst.c trnstst.c)
target_link_libraries(iotest icu_defaults icuuc ctestfw icuio icui18n)
if(BUILD_TESTING)
add_test(NAME iotest COMMAND iotest WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()

View file

@ -0,0 +1,15 @@
add_executable(letest)
target_link_libraries(letest icu_defaults)
target_sources(letest PRIVATE
FontObject.cpp
FontTableCache.cpp
PortableFontInstance.cpp
SimpleFontInstance.cpp
cfonts.cpp
cletest.c
cmaps.cpp
gendata.cpp
letest.cpp
letsutil.cpp
testdata.cpp
xmlreader.cpp)

View file

@ -0,0 +1,2 @@
add_executable(testmap testmap.c)
target_link_libraries(testmap icu_defaults icuuc)

View file

@ -0,0 +1,2 @@
add_executable(thaitest thaitest.cpp)
target_link_libraries(thaitest icu_defaults)

View file

@ -0,0 +1,19 @@
add_subdirectory(ctestfw)
add_subdirectory(genbrk)
add_subdirectory(genccode)
add_subdirectory(gencfu)
add_subdirectory(gencmn)
add_subdirectory(gencnval)
add_subdirectory(gendict)
add_subdirectory(gennorm2)
add_subdirectory(genrb)
add_subdirectory(gensprep)
add_subdirectory(gentest)
add_subdirectory(icuexportdata)
add_subdirectory(icuinfo)
add_subdirectory(icupkg)
add_subdirectory(icuswap)
add_subdirectory(makeconv)
add_subdirectory(pkgdata)
add_subdirectory(toolutil)
add_subdirectory(tzcode)

View file

@ -0,0 +1,11 @@
add_library(ctestfw)
target_link_libraries(ctestfw PRIVATE icu_defaults icuuc toolutil)
target_include_directories(ctestfw PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(ctestfw PRIVATE T_CTEST_IMPLEMENTATION)
target_sources(ctestfw PRIVATE
ctest.c
datamap.cpp
testdata.cpp
tstdtmod.cpp
ucln_ct.c
uperf.cpp)

View file

@ -0,0 +1,2 @@
add_executable(genbrk genbrk.cpp)
target_link_libraries(genbrk PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,2 @@
add_executable(genccode genccode.c)
target_link_libraries(genccode PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,2 @@
add_executable(gencfu gencfu.cpp)
target_link_libraries(gencfu PRIVATE icu_defaults icuuc toolutil icui18n)

View file

@ -0,0 +1,2 @@
add_executable(gencmn gencmn.c)
target_link_libraries(gencmn PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,2 @@
add_executable(gencnval gencnval.c)
target_link_libraries(gencnval PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,2 @@
add_executable(gendict gendict.cpp)
target_link_libraries(gendict PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,7 @@
add_executable(gennorm2)
target_link_libraries(gennorm2 PRIVATE icu_defaults icuuc toolutil)
target_sources(gennorm2 PRIVATE
extradata.cpp
gennorm2.cpp
n2builder.cpp
norms.cpp)

View file

@ -0,0 +1,18 @@
add_executable(genrb)
target_link_libraries(genrb PRIVATE icu_defaults icuuc toolutil icui18n)
target_sources(genrb PRIVATE
errmsg.c
filterrb.cpp
genrb.cpp
parse.cpp
prscmnts.cpp
rbutil.c
read.c
reslist.cpp
rle.c
ustr.c
wrtjava.cpp
wrtxml.cpp)
add_executable(derb derb.cpp)
target_link_libraries(derb PRIVATE icu_defaults icuuc toolutil icuio icui18n)

View file

@ -0,0 +1,2 @@
add_executable(gensprep gensprep.c store.c)
target_link_libraries(gensprep PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,2 @@
add_executable(gentest gentest.c genres32.c)
target_link_libraries(gentest PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,2 @@
add_executable(icuexportdata icuexportdata.cpp)
target_link_libraries(icuexportdata PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,5 @@
add_executable(icuinfo icuinfo.cpp)
target_link_libraries(icuinfo PRIVATE icu_defaults icuuc toolutil icui18n)
add_library(testplug testplug.c)
target_link_libraries(testplug PRIVATE icu_lib_defaults icuuc)

View file

@ -0,0 +1,2 @@
add_executable(icupkg icupkg.cpp)
target_link_libraries(icupkg PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,2 @@
add_executable(icuswap icuswap.cpp)
target_link_libraries(icuswap PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,2 @@
add_executable(makeconv gencnvex.c genmbcs.cpp makeconv.cpp ucnvstat.c)
target_link_libraries(makeconv PRIVATE icu_defaults icuuc toolutil)

View file

@ -0,0 +1,19 @@
add_executable(pkgdata pkgdata.cpp pkgtypes.c)
target_link_libraries(pkgdata PRIVATE icu_defaults icuuc toolutil)
add_dependencies(pkgdata gencnval)
add_custom_command(
TARGET pkgdata POST_BUILD
COMMAND nmake /nologo /f ${icu4c_SOURCE_DIR}/data/makedata.mak
ICUMAKE=${icu4c_SOURCE_DIR}/data
DLL_OUTPUT=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
ICUPBIN=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
GENRB_DIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
GENCNVAL_DIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
GENCFU_DIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
ICUPKG_DIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
MAKECONV_DIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
CFG=${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}\\$<CONFIG>
$<$<CONFIG:Debug>:DEBUG=true>
VERBATIM)

View file

@ -0,0 +1,29 @@
add_library(toolutil)
target_link_libraries(toolutil PRIVATE icu_lib_defaults icuuc icui18n)
target_include_directories(toolutil PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(toolutil PRIVATE U_TOOLUTIL_IMPLEMENTATION)
target_sources(toolutil PRIVATE
collationinfo.cpp
dbgutil.cpp
denseranges.cpp
filestrm.cpp
filetools.cpp
flagparser.cpp
package.cpp
pkg_genc.cpp
pkg_gencmn.cpp
pkg_icu.cpp
pkgitems.cpp
ppucd.cpp
swapimpl.cpp
toolutil.cpp
ucbuf.cpp
ucln_tu.cpp
ucm.cpp
ucmstate.cpp
udbgutil.cpp
unewdata.cpp
uoptions.cpp
uparse.cpp
writesrc.cpp
xmlparser.cpp)

View file

@ -0,0 +1,3 @@
add_executable(icuzdump icuzdump.cpp)
target_link_libraries(icuzdump PRIVATE
icu_defaults icuuc toolutil icui18n icuio)