Skip to content

Commit 8ae63f1

Browse files
committed
Fix LLVM 7 issues with MSVC, enable FindClangTools.cmake to find clang-format in conda env
1 parent 3677115 commit 8ae63f1

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

cpp/cmake_modules/FindClangTools.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ set(CLANG_TOOLS_SEARCH_PATHS
5353
${ClangTools_PATH}
5454
$ENV{CLANG_TOOLS_PATH}
5555
/usr/local/bin /usr/bin
56-
"C:/Program Files/LLVM/bin"
57-
"${HOMEBREW_PREFIX}/bin")
56+
"C:/Program Files/LLVM/bin" # Windows, non-conda
57+
"$ENV{CONDA_PREFIX}/Library/bin" # Windows, conda
58+
"${HOMEBREW_PREFIX}/bin"
59+
)
5860

5961
find_program(CLANG_TIDY_BIN
6062
NAMES clang-tidy-${ARROW_LLVM_VERSION}

cpp/src/gandiva/engine.cc

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

18+
// TODO(wesm): LLVM 7 produces pesky C4244 that disable pragmas around the LLVM
19+
// includes seem to not fix as with LLVM 6
20+
#if defined(_MSC_VER)
21+
#pragma warning(disable : 4244)
22+
#endif
23+
1824
#include "gandiva/engine.h"
1925

2026
#include <iostream>

cpp/src/gandiva/precompiled/time_test.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ TEST(TestTime, TestCastTimestamp) {
6767
-1187308799080);
6868
EXPECT_EQ(castTIMESTAMP_utf8(context_ptr, "1857-02-11 20:31:40.920 -05:30", 30),
6969
-3562264699080);
70+
}
71+
72+
#ifndef _WIN32
73+
74+
// TODO(wesm): ARROW-4495. Need to address TZ database issues on Windows
75+
76+
TEST(TestTime, TestCastTimestampWithTZ) {
77+
ExecutionContext context;
78+
int64_t context_ptr = reinterpret_cast<int64_t>(&context);
7079

7180
EXPECT_EQ(castTIMESTAMP_utf8(context_ptr, "2000-09-23 9:45:30.920 Canada/Pacific", 37),
7281
969727530920);
@@ -76,10 +85,6 @@ TEST(TestTime, TestCastTimestamp) {
7685
-1459094217000);
7786
}
7887

79-
#ifndef _WIN32
80-
81-
// TODO(wesm): ARROW-4495. Fix these tests on Windows
82-
8388
TEST(TestTime, TestCastTimestampErrors) {
8489
ExecutionContext context;
8590
int64_t context_ptr = reinterpret_cast<int64_t>(&context);

0 commit comments

Comments
 (0)