orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From majetideepak <...@git.apache.org>
Subject [GitHub] orc pull request #142: [ORC-218] Cache timezone information in the library.
Date Thu, 27 Jul 2017 16:14:57 GMT
Github user majetideepak commented on a diff in the pull request:

    --- Diff: c++/src/CMakeLists.txt ---
    @@ -125,6 +125,83 @@ include_directories (
    +# To avoid reading the Timezone database from disk, we load the file during the
    +# build and inject them as binary into the library. This can increase the size
    +# of library but avoids doing system calls at runtime. The behavior can be
    +# disabled by using the CMake flag NO_EMBEDDED_TZ_DB
    +  set(EMBEDDED_TZ_DB ON)
    +if (EMBEDDED_TZ_DB)
    +  message(STATUS "Caching of timezone data enabled.")
    +  set(DEFAULT_TIMEZONE_DIR "/usr/share/zoneinfo")
    +  # Check if zone1970.tab is present, otherwise select zone.tab
    +  # Parse zone tab to extract all availble zones
    +  execute_process(COMMAND find ${DEFAULT_TIMEZONE_DIR} -type f
    +    COMMAND grep -v "posix"
    +    COMMAND grep -v "right"
    +    COMMAND grep -v "tab"
    +  if (TZ_LIST_RC)
    +    message(FATAL_ERROR "Could not parse Timezone database.")
    +  endif()
    +  set(FILE2ARRAY "${CMAKE_CURRENT_SOURCE_DIR}/../file2array.sh")
    +  # For each zone generate a target
    +  # Add each target to dependency on Timezone.cc
    +  set(TZ_DEPS "")
    --- End diff --
    hoist this initialization out of the `if (EMBEDDED_TZ_DB)`?
    That way we can safely add it as a dependency to orc library on line 214

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message