From 9022fa426d7c587326950367606737aa8df37145 Mon Sep 17 00:00:00 2001 From: David Mott Date: Sat, 4 May 2019 02:14:40 -0500 Subject: [PATCH] minor fixups --- CMakeLists.txt | 9 +++++++-- exemgr/CMakeLists.txt | 4 +++- exemgr/main.cpp | 8 ++++---- utils/rowgroup/rowaggregation.cpp | 13 ++++--------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0da43339..b931d30c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ if(SERVER_BUILD_DIR) endif() INCLUDE(ExternalProject) +INCLUDE(CheckCXXSourceCompiles) SET(CMAKE_CXX_STANDARD 11) SET(CMAKE_CXX_STANDARD_REQUIRED TRUE) @@ -76,8 +77,12 @@ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${CMAKE_CURRENT_BINARY_DIR}/external) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) -find_package(Boost 1.53.0 REQUIRED COMPONENTS system filesystem thread regex date_time) -find_package(BISON REQUIRED) +FIND_PACKAGE(Boost 1.53.0 REQUIRED COMPONENTS system filesystem thread regex date_time) +FIND_PACKAGE(BISON REQUIRED) + +check_cxx_source_compiles("#include \n void main(){}" HAS_STD_FILESYSTEM) +check_cxx_source_compiles("#include \n void main(){}" HAS_STD_EXPERIMENTAL_FILESYSTEM) + INCLUDE(columnstore_version) SET (PACKAGE columnstore) diff --git a/exemgr/CMakeLists.txt b/exemgr/CMakeLists.txt index 5f77ed886..5ffdd1e44 100644 --- a/exemgr/CMakeLists.txt +++ b/exemgr/CMakeLists.txt @@ -8,9 +8,11 @@ set(ExeMgr_SRCS main.cpp activestatementcounter.cpp femsghandler.cpp ../utils/co add_executable(ExeMgr ${ExeMgr_SRCS}) -target_link_libraries(ExeMgr ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} cacheutils threadpool stdc++fs) +target_link_libraries(ExeMgr ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} cacheutils threadpool) +target_include_directories(ExeMgr PRIVATE ${Boost_INCLUDE_DIRS}) +target_compile_features(ExeMgr PRIVATE ) install(TARGETS ExeMgr DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/exemgr/main.cpp b/exemgr/main.cpp index 6790fafbb..36d8f639d 100644 --- a/exemgr/main.cpp +++ b/exemgr/main.cpp @@ -43,14 +43,14 @@ #include -#include #include - #include #include #include +#include + #include "calpontselectexecutionplan.h" #include "activestatementcounter.h" #include "distributedenginecomm.h" @@ -1365,8 +1365,8 @@ void cleanTempDir() /* This is quite scary as ExeMgr usually runs as root */ try { - std::experimental::filesystem::remove_all(tmpPrefix); - std::experimental::filesystem::create_directories(tmpPrefix); + boost::filesystem::remove_all(tmpPrefix); + boost::filesystem::create_directories(tmpPrefix); } catch (const std::exception& ex) { diff --git a/utils/rowgroup/rowaggregation.cpp b/utils/rowgroup/rowaggregation.cpp index 2a1dd862e..003d58281 100644 --- a/utils/rowgroup/rowaggregation.cpp +++ b/utils/rowgroup/rowaggregation.cpp @@ -29,6 +29,8 @@ #include #include #include +#include + #include "joblisttypes.h" #include "resourcemanager.h" #include "groupconcat.h" @@ -51,20 +53,13 @@ //..comment out NDEBUG to enable assertions, uncomment NDEBUG to disable //#define NDEBUG -#include +#include "funcexp/utils_utf8.h" + using namespace std; using namespace boost; using namespace dataconvert; -namespace funcexp -{ - namespace utf8 - { - int idb_strcoll(const char*, const char*); - } -} - // inlines of RowAggregation that used only in this file namespace