Commit 922f6dfe by Leonardo Silvestri

compile itests and packages without additional path setting when ztsdb is installed

1 parent 249b2234
Pipeline #6572071 passed
in 43 minutes 19 seconds
......@@ -16,14 +16,15 @@
// along with ztsdb. If not, see <http://www.gnu.org/licenses/>.
#include <sys/eventfd.h>
#include "zconnection.hpp"
#include "zconversion.hpp"
#include "parser_ctx.hpp"
#include "load_builtin.hpp"
#include "anf.hpp"
#include "globals.hpp"
#include "logging.hpp"
#include <sys/eventfd.h>
#include <ztsdb/parser_ctx.hpp>
#include <ztsdb/load_builtin.hpp>
#include <ztsdb/anf.hpp>
#include <ztsdb/globals.hpp>
#include <ztsdb/logging.hpp>
// #define _DEBUG
......
......@@ -23,8 +23,8 @@
#include <unistd.h>
#include <fcntl.h>
#include "net_handler.hpp"
#include "net_client.hpp"
#include <ztsdb/net_handler.hpp>
#include <ztsdb/net_client.hpp>
class Zconnection {
......
......@@ -44,8 +44,8 @@
// SOFTWARE.
#include <ztsdb/globals.hpp>
#include "zconversion.hpp"
#include "globals.hpp"
static Rcpp::List convertDimnames(const std::vector<std::unique_ptr<arr::Dname>>& dnames) {
......
......@@ -21,7 +21,7 @@
#include <Rcpp.h>
#include "valuevar.hpp" // <> rather than "" I guess LLL
#include <ztsdb/valuevar.hpp>
SEXP valueToSEXP(const val::Value& v);
......
FIND_PACKAGE(Boost COMPONENTS system filesystem REQUIRED)
SET(SRC ../../src)
SET(BASE ../..)
SET(SRC ${BASE}/src)
SET(SOURCE_FILES
append.cpp
......@@ -11,7 +12,7 @@ SET(SOURCE_FILES
ADD_EXECUTABLE(append ${SOURCE_FILES})
INCLUDE_DIRECTORIES(
${SRC}
${BASE}
${LIBDOUBLE_CONVERSION_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(
......
// -*- compile-command: "make -k -j8 append" -*-
// -*- compile-command: "g++ -g -std=c++1y append.cpp -o append -lstdc++ -lztsdb -lboost_system" -*-
// Copyright (C) 2017 Leonardo Silvestri
//
......@@ -26,8 +26,8 @@
#include <string>
#include <iostream>
#include <limits>
#include "zcpp.hpp"
#include "cow_ptr.hpp"
#include <ztsdb/zcpp.hpp>
#include <ztsdb/cow_ptr.hpp>
static void loop_append(const std::string ip,
......
......@@ -5,6 +5,7 @@ ADD_EXECUTABLE(client ${SOURCE_FILES})
FIND_PACKAGE(Boost COMPONENTS system filesystem REQUIRED)
INCLUDE_DIRECTORIES(
../..
../../src
../../src/main_parser
${CMAKE_CURRENT_BINARY_DIR}/../../src/main_parser
......
......@@ -18,11 +18,11 @@
#include <iostream>
#include <sys/eventfd.h>
#include "parser_ctx.hpp"
#include "logging.hpp"
#include "net_client.hpp"
#include "anf.hpp"
#include "display.hpp"
#include <ztsdb/parser_ctx.hpp>
#include <ztsdb/logging.hpp>
#include <ztsdb/net_client.hpp>
#include <ztsdb/anf.hpp>
#include <ztsdb/display.hpp>
tz::Zones tzones("/usr/share/zoneinfo"); // should be configurable LLL
......
FIND_PACKAGE(Boost COMPONENTS system filesystem REQUIRED)
SET(SRC ../../src)
SET(BASE ../..)
SET(SRC ${BASE}/src)
SET(SOURCE_FILES
simple_append.cpp
......@@ -14,7 +15,7 @@ SET_SOURCE_FILES_PROPERTIES(${SRC}/timezone/localtime.cpp
ADD_EXECUTABLE(simple_append ${SOURCE_FILES})
INCLUDE_DIRECTORIES(
${SRC}
${BASE}
${LIBDOUBLE_CONVERSION_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(
......
// -*- compile-command: "make -k -j8 simple_append" -*-
// -*- compile-command: "g++ -g -std=c++1y simple_append.cpp -o simple_append -lstdc++ -lztsdb_client -lboost_system" -*-
// Copyright (C) 2016 Leonardo Silvestri
//
......@@ -29,7 +29,7 @@
#include <vector>
#include <system_error>
#include <unistd.h>
#include "zcpp_stdlib.hpp"
#include "ztsdb/zcpp_stdlib.hpp"
static void simple_append(const std::string ip,
......
FIND_PACKAGE(Boost COMPONENTS system filesystem REQUIRED)
SET(SRC ../../src)
SET(BASE ../..)
SET(SRC ${BASE}/src)
SET(SOURCE_FILES
simple_append.c
......@@ -11,7 +12,7 @@ SET(SOURCE_FILES
ADD_EXECUTABLE(simple_append_c ${SOURCE_FILES})
INCLUDE_DIRECTORIES(
${SRC}
${BASE}
${LIBDOUBLE_CONVERSION_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(
......
// -*- compile-command: "make -k -j8 simple_append" -*-
// -*- compile-command: "gcc -g simple_append.c -o simple_append -lztsdb_client -lboost_system" -*-
// Copyright (C) 2017 Leonardo Silvestri
//
......@@ -28,7 +28,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include "zc.h"
#include "ztsdb/zc.h"
static void simple_append(const char* ip, int port, const char* varname, size_t ncols)
......
......@@ -31,7 +31,6 @@ SET(SOURCE_FILES
allocator.hpp
anf.cpp
anf.hpp
api.hpp
array.cpp
array.hpp
array_ops.hpp
......@@ -159,25 +158,15 @@ TARGET_LINK_LIBRARIES(
)
SET(HEADER_FILES
main_parser/location.hpp
main_parser/position.hpp
SET(ZTSDB_HEADER_FILES
ast.hpp
anf.hpp
display.hpp
globals.hpp
timezone/interval.hpp
timezone/zone.hpp
timezone/tz.hpp
timezone/tzfile.h
timezone/ztime_vector.hpp
timezone/ztime.hpp
cow_ptr.hpp
string.hpp
dname.hpp
array.hpp
juice/variant.hpp
juice/mpl.hpp
allocator_factory.hpp
allocator.hpp
misc.hpp
......@@ -190,8 +179,6 @@ SET(HEADER_FILES
net_client.hpp
encode.hpp
valuevar.hpp
juice/variant_binary.hpp
juice/variant.hpp
zts.hpp
valuevar_ic.hpp
valuevector.hpp
......@@ -200,7 +187,38 @@ SET(HEADER_FILES
info.hpp
config.hpp
index.hpp
parser_ctx.hpp
pseudovector.hpp
load_builtin.hpp
env.hpp
zcpp_stdlib.hpp
zc.h
main_parser/location.hpp
main_parser/position.hpp
)
SET(JUICE_HEADER_FILES
juice/variant.hpp
juice/variant_binary.hpp
juice/mpl.hpp
)
SET(MAIN_PARSER_HEADER_FILES
main_parser/location.hpp
main_parser/position.hpp
)
SET(TIMEZONE_HEADER_FILES
timezone/interval.hpp
timezone/zone.hpp
timezone/tz.hpp
timezone/tzfile.h
timezone/ztime_vector.hpp
timezone/ztime.hpp
)
INSTALL(TARGETS ztsdb DESTINATION bin)
INSTALL(FILES ${HEADER_FILES} DESTINATION include/ztsdb)
INSTALL(FILES ${ZTSDB_HEADER_FILES} DESTINATION include/ztsdb)
INSTALL(FILES ${JUICE_HEADER_FILES} DESTINATION include/ztsdb/juice)
INSTALL(FILES ${MAIN_PARSER_HEADER_FILES} DESTINATION include/ztsdb/main_parser)
INSTALL(FILES ${TIMEZONE_HEADER_FILES} DESTINATION include/ztsdb/timezone)
// (C) 2016 Leonardo Silvestri
//
// This file is part of ztsdb.
//
// ztsdb is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ztsdb is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ztsdb. If not, see <http://www.gnu.org/licenses/>.
#ifndef API_HPP
#define API_HPP
// all the different value types
#include "valuevar.hpp"
#include "env.hpp"
// standardized exceptions
extern interp::shpfrm global; // should it really be here??? LLL
extern interp::shpfrm base; // should it really be here??? LLL
#endif
......@@ -18,7 +18,6 @@
#include "load_builtin.hpp"
#include "base_funcs.hpp"
#include "api.hpp"
// #define DEBUG
......
......@@ -30,7 +30,8 @@
#include "misc.hpp"
#include "globals.hpp"
#include "logging.hpp"
#include "api.hpp"
#include "juice/variant.hpp"
#include "juice/variant_binary.hpp"
// #define DEBUG
......@@ -177,7 +178,7 @@ bool net::BufferMgt::get_data(Global::conn_id_t& id, Buf& buf) {
size_t net::BufferMgt::gc() {
size_t bytes = 0;
std::chrono::system_clock::time_point::duration combufttl =
std::chrono::seconds(get<int64_t>(cfg::cfgmap.get("commbuf.ttl.secs")));
std::chrono::seconds(Juice::get<int64_t>(cfg::cfgmap.get("commbuf.ttl.secs")));
auto now = std::chrono::system_clock::now();
mx.lock();
for (auto i = bufmap.begin(); i != bufmap.end(); ++i) {
......
src
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!