Skip to content

Commit 5120baa

Browse files
rip-nskomalley
authored andcommitted
ORC-366: Improve TZDIR setup for WIN32
Fixes apache#271 Signed-off-by: Owen O'Malley <[email protected]>
1 parent 19736f5 commit 5120baa

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

appveyor.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
# Operating system (build VM template)
19-
# os: Visual Studio 2017
20-
2118
environment:
2219
matrix:
2320
- JOB: Visual Studio 2015
@@ -40,6 +37,5 @@ build_script:
4037
-DBUILD_LIBHDFSPP=OFF
4138
-DBUILD_TOOLS=OFF
4239
-DBUILD_JAVA=OFF
43-
- set TZDIR=C:/projects/orc/build/tzdata_ep-prefix/src/tzdata_ep/share/zoneinfo
4440
- cmake --build . --config %CONFIGURATION%
4541
- ctest -VV -C %CONFIGURATION%

c++/test/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,11 @@ target_link_libraries (create-test-files
6565
)
6666

6767
add_test (NAME orc-test COMMAND orc-test)
68+
69+
if (WIN32)
70+
set_property(
71+
TEST orc-test
72+
PROPERTY
73+
ENVIRONMENT "TZDIR=${TZDATA_DIR}"
74+
)
75+
endif ()

cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ if (WIN32)
175175
CONFIGURE_COMMAND ""
176176
BUILD_COMMAND ""
177177
INSTALL_COMMAND "")
178+
ExternalProject_Get_Property(tzdata_ep SOURCE_DIR)
179+
set(TZDATA_DIR ${SOURCE_DIR}/share/zoneinfo)
178180
endif ()
179181

180182
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)