mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:47:45 +00:00
LibUnicode: Stop passing the cldr-core package to UnicodeNumberFormat
This is no longer needed now that this generator isn't parsing the default-content locales.
This commit is contained in:
parent
a13fa15a30
commit
4b535ce1c8
2 changed files with 4 additions and 6 deletions
|
@ -174,12 +174,12 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${UNICODE_NUMBER_FORMAT_HEADER} ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}
|
OUTPUT ${UNICODE_NUMBER_FORMAT_HEADER} ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}
|
||||||
COMMAND $<TARGET_FILE:Lagom::GenerateUnicodeNumberFormat> -h ${UNICODE_NUMBER_FORMAT_HEADER}.tmp -c ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp -r ${CLDR_CORE_PATH} -n ${CLDR_NUMBERS_PATH} -u ${CLDR_UNITS_PATH}
|
COMMAND $<TARGET_FILE:Lagom::GenerateUnicodeNumberFormat> -h ${UNICODE_NUMBER_FORMAT_HEADER}.tmp -c ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp -n ${CLDR_NUMBERS_PATH} -u ${CLDR_UNITS_PATH}
|
||||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${UNICODE_NUMBER_FORMAT_HEADER}.tmp ${UNICODE_NUMBER_FORMAT_HEADER}
|
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${UNICODE_NUMBER_FORMAT_HEADER}.tmp ${UNICODE_NUMBER_FORMAT_HEADER}
|
||||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}
|
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove ${UNICODE_NUMBER_FORMAT_HEADER}.tmp ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp
|
COMMAND "${CMAKE_COMMAND}" -E remove ${UNICODE_NUMBER_FORMAT_HEADER}.tmp ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp
|
||||||
VERBATIM
|
VERBATIM
|
||||||
DEPENDS Lagom::GenerateUnicodeNumberFormat ${CLDR_CORE_PATH} ${CLDR_LOCALES_PATH} ${CLDR_MISC_PATH} ${CLDR_NUMBERS_PATH} ${CLDR_UNITS_PATH}
|
DEPENDS Lagom::GenerateUnicodeNumberFormat ${CLDR_LOCALES_PATH} ${CLDR_MISC_PATH} ${CLDR_NUMBERS_PATH} ${CLDR_UNITS_PATH}
|
||||||
)
|
)
|
||||||
add_custom_target(generate_${UNICODE_META_TARGET_PREFIX}UnicodeNumberFormat DEPENDS ${UNICODE_NUMBER_FORMAT_HEADER} ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION})
|
add_custom_target(generate_${UNICODE_META_TARGET_PREFIX}UnicodeNumberFormat DEPENDS ${UNICODE_NUMBER_FORMAT_HEADER} ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION})
|
||||||
add_dependencies(all_generated generate_${UNICODE_META_TARGET_PREFIX}UnicodeNumberFormat)
|
add_dependencies(all_generated generate_${UNICODE_META_TARGET_PREFIX}UnicodeNumberFormat)
|
||||||
|
|
|
@ -445,7 +445,7 @@ static void parse_units(String locale_units_path, UnicodeLocaleData& locale_data
|
||||||
parse_units_object(narrow_object.as_object(), Unicode::Style::Narrow);
|
parse_units_object(narrow_object.as_object(), Unicode::Style::Narrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void parse_all_locales(String core_path, String numbers_path, String units_path, UnicodeLocaleData& locale_data)
|
static void parse_all_locales(String numbers_path, String units_path, UnicodeLocaleData& locale_data)
|
||||||
{
|
{
|
||||||
auto numbers_iterator = path_to_dir_iterator(move(numbers_path));
|
auto numbers_iterator = path_to_dir_iterator(move(numbers_path));
|
||||||
auto units_iterator = path_to_dir_iterator(move(units_path));
|
auto units_iterator = path_to_dir_iterator(move(units_path));
|
||||||
|
@ -910,14 +910,12 @@ int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
char const* generated_header_path = nullptr;
|
char const* generated_header_path = nullptr;
|
||||||
char const* generated_implementation_path = nullptr;
|
char const* generated_implementation_path = nullptr;
|
||||||
char const* core_path = nullptr;
|
|
||||||
char const* numbers_path = nullptr;
|
char const* numbers_path = nullptr;
|
||||||
char const* units_path = nullptr;
|
char const* units_path = nullptr;
|
||||||
|
|
||||||
Core::ArgsParser args_parser;
|
Core::ArgsParser args_parser;
|
||||||
args_parser.add_option(generated_header_path, "Path to the Unicode locale header file to generate", "generated-header-path", 'h', "generated-header-path");
|
args_parser.add_option(generated_header_path, "Path to the Unicode locale header file to generate", "generated-header-path", 'h', "generated-header-path");
|
||||||
args_parser.add_option(generated_implementation_path, "Path to the Unicode locale implementation file to generate", "generated-implementation-path", 'c', "generated-implementation-path");
|
args_parser.add_option(generated_implementation_path, "Path to the Unicode locale implementation file to generate", "generated-implementation-path", 'c', "generated-implementation-path");
|
||||||
args_parser.add_option(core_path, "Path to cldr-core directory", "core-path", 'r', "core-path");
|
|
||||||
args_parser.add_option(numbers_path, "Path to cldr-numbers directory", "numbers-path", 'n', "numbers-path");
|
args_parser.add_option(numbers_path, "Path to cldr-numbers directory", "numbers-path", 'n', "numbers-path");
|
||||||
args_parser.add_option(units_path, "Path to cldr-units directory", "units-path", 'u', "units-path");
|
args_parser.add_option(units_path, "Path to cldr-units directory", "units-path", 'u', "units-path");
|
||||||
args_parser.parse(argc, argv);
|
args_parser.parse(argc, argv);
|
||||||
|
@ -942,7 +940,7 @@ int main(int argc, char** argv)
|
||||||
auto generated_implementation_file = open_file(generated_implementation_path, "-c/--generated-implementation-path", Core::OpenMode::ReadWrite);
|
auto generated_implementation_file = open_file(generated_implementation_path, "-c/--generated-implementation-path", Core::OpenMode::ReadWrite);
|
||||||
|
|
||||||
UnicodeLocaleData locale_data;
|
UnicodeLocaleData locale_data;
|
||||||
parse_all_locales(core_path, numbers_path, units_path, locale_data);
|
parse_all_locales(numbers_path, units_path, locale_data);
|
||||||
|
|
||||||
generate_unicode_locale_header(generated_header_file, locale_data);
|
generate_unicode_locale_header(generated_header_file, locale_data);
|
||||||
generate_unicode_locale_implementation(generated_implementation_file, locale_data);
|
generate_unicode_locale_implementation(generated_implementation_file, locale_data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue