Skip to content

Commit

Permalink
ORC-448. Fix centos6 compilation ""error: converting ‘false’ to point…
Browse files Browse the repository at this point in the history
…er type"

Fixes apache#350

Signed-off-by: Owen O'Malley <omalley@apache.org>
  • Loading branch information
omalley committed Dec 19, 2018
1 parent 2528fe7 commit faa0f5c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -12,7 +12,7 @@

cmake_minimum_required (VERSION 2.6)

project(ORC)
project(ORC C CXX)

# Version number of package
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
Expand Down
10 changes: 5 additions & 5 deletions c++/test/TestDictionaryEncoding.cc
Expand Up @@ -104,7 +104,7 @@ namespace orc {
EXPECT_EQ(i % dictionarySize, static_cast<uint64_t>(atoi(str.c_str())));
}

EXPECT_EQ(false, rowReader->next(*batch));
EXPECT_FALSE(static_cast<bool>(rowReader->next(*batch)));
}

void testVarcharDictionary(bool enableIndex, double threshold) {
Expand Down Expand Up @@ -170,7 +170,7 @@ namespace orc {
EXPECT_EQ(varcharRead, varcharExpected);
}

EXPECT_EQ(false, rowReader->next(*batch));
EXPECT_FALSE(rowReader->next(*batch));
}

void testCharDictionary(bool enableIndex, double threshold) {
Expand Down Expand Up @@ -238,7 +238,7 @@ namespace orc {
EXPECT_EQ(charsExpected, charsRead);
}

EXPECT_EQ(false, rowReader->next(*batch));
EXPECT_FALSE(rowReader->next(*batch));
}

void testStringDictionaryWithNull(double threshold, bool enableIndex) {
Expand Down Expand Up @@ -311,7 +311,7 @@ namespace orc {
}
}

EXPECT_EQ(false, rowReader->next(*batch));
EXPECT_FALSE(rowReader->next(*batch));
}

void testDictionaryMultipleStripes(double threshold, bool enableIndex) {
Expand Down Expand Up @@ -381,7 +381,7 @@ namespace orc {
EXPECT_EQ(i % dictionarySize, static_cast<uint64_t>(atoi(str.c_str())));
}
}
EXPECT_EQ(false, rowReader->next(*batch));
EXPECT_FALSE(rowReader->next(*batch));

// test seeking to check positions
batch = rowReader->createRowBatch(1);
Expand Down
5 changes: 4 additions & 1 deletion cmake_modules/ThirdpartyToolchain.cmake
Expand Up @@ -17,6 +17,9 @@ set(GTEST_VERSION "1.8.0")
set(PROTOBUF_VERSION "3.5.1")
set(ZSTD_VERSION "1.3.5")

# zstd requires us to add the threads
FIND_PACKAGE(Threads REQUIRED)

set(THIRDPARTY_DIR "${CMAKE_BINARY_DIR}/c++/libs/thirdparty")
set(THIRDPARTY_LOG_OPTIONS LOG_CONFIGURE 1
LOG_BUILD 1
Expand Down Expand Up @@ -148,7 +151,7 @@ else ()
endif ()
set(ZSTD_STATIC_LIB "${ZSTD_HOME}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${ZSTD_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(ZSTD_CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${ZSTD_HOME}
-DBUILD_SHARED_LIBS=OFF)
-DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_LIBDIR=lib)

if (CMAKE_VERSION VERSION_GREATER "3.7")
set(ZSTD_CONFIGURE SOURCE_SUBDIR "build/cmake" CMAKE_ARGS ${ZSTD_CMAKE_ARGS})
Expand Down
7 changes: 7 additions & 0 deletions tools/src/CMakeLists.txt
Expand Up @@ -33,6 +33,7 @@ add_executable (orc-contents

target_link_libraries (orc-contents
orc
${CMAKE_THREAD_LIBS_INIT}
)

add_executable (orc-scan
Expand All @@ -41,6 +42,7 @@ add_executable (orc-scan

target_link_libraries (orc-scan
orc
${CMAKE_THREAD_LIBS_INIT}
)

add_executable (orc-metadata
Expand All @@ -50,6 +52,7 @@ add_executable (orc-metadata
target_link_libraries (orc-metadata
orc
protobuf
${CMAKE_THREAD_LIBS_INIT}
)

add_executable (orc-statistics
Expand All @@ -58,6 +61,7 @@ target_link_libraries (orc-metadata

target_link_libraries (orc-statistics
orc
${CMAKE_THREAD_LIBS_INIT}
)

add_executable (orc-memory
Expand All @@ -66,6 +70,7 @@ add_executable (orc-memory

target_link_libraries (orc-memory
orc
${CMAKE_THREAD_LIBS_INIT}
)

add_executable (timezone-dump
Expand All @@ -74,6 +79,7 @@ add_executable (timezone-dump

target_link_libraries (timezone-dump
orc
${CMAKE_THREAD_LIBS_INIT}
)

add_executable (csv-import
Expand All @@ -82,6 +88,7 @@ add_executable (csv-import

target_link_libraries (csv-import
orc
${CMAKE_THREAD_LIBS_INIT}
)

install(TARGETS
Expand Down

0 comments on commit faa0f5c

Please sign in to comment.