From 5bb436375fdfd4e7f89047e05eb7da295973dbe7 Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 14:09:12 +0200 Subject: [PATCH 01/13] Changed makefiles --- Makefile.am | 51 ++++-- Makefile.in | 509 +++++++++++++++++++++++---------------------------- configure.ac | 19 ++ 3 files changed, 284 insertions(+), 295 deletions(-) diff --git a/Makefile.am b/Makefile.am index 254da72..68021fb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ VPATH = @srcdir@ AUTOMAKE_OPTIONS = foreign subdir-objects -AM_CXXFLAGS = -I$(top_srcdir) -pthread -std=c++14 -Wall -Wextra -Wnarrowing -pedantic @BAACK_CPPFLAGS@ +AM_CXXFLAGS = -I$(top_srcdir) -pthread -Wall -Wextra -pedantic @BAACK_CPPFLAGS@ @@ -22,8 +22,30 @@ endif nobase_include_HEADERS = +if BAACK_WITH_DYNSTACK + +if BAACK_WITH_REMOTECONTROL +lib_LIBRARIES = libBaack.a libDynstack.a libRemotecontrol.a +else +lib_LIBRARIES = libBaack.a libDynstack.a +endif + +else + +if BAACK_WITH_REMOTECONTROL +lib_LIBRARIES = libBaack.a libRemotecontrol.a +else +lib_LIBRARIES = +endif + +endif + + + + ## Dynstack -lib_LIBRARIES = libDynstack.a libRemotecontrol.a libBaack.a +if BAACK_WITH_DYNSTACK +##lib_LIBRARIES += libDynstack.a libDynstack_a_SOURCES = dynstack/export.cpp @@ -32,19 +54,24 @@ libDynstack_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ else libDynstack_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ endif +endif ## Remotecontrol -libRemotecontrol_a_SOURCES = remote_control/communication/packet.cpp \ - remote_control/communication/message_queue.cpp \ - remote_control/export.cpp \ - remote_control/control/periodic_task.cpp \ - remote_control/control/main_control.cpp \ - remote_control/control/recv_cache.cpp +if BAACK_WITH_REMOTECONTROL +##lib_LIBRARIES += libRemotecontrol.a + +libRemotecontrol_a_SOURCES = remote_control/export.cpp \ + remote_control/communication/packet.cpp \ + remote_control/communication/message_queue.cpp \ + remote_control/control/periodic_task.cpp \ + remote_control/control/main_control.cpp \ + remote_control/control/recv_cache.cpp if BAACK_WITHTEST -libRemotecontrol_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ +libRemotecontrol_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ else -libRemotecontrol_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ +libRemotecontrol_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ +endif endif ## Dependency library for Dynstack and Remotecontrol @@ -65,9 +92,9 @@ libBaack_a_SOURCES = lib/data/corsika/event_header.cpp \ basic/basic.cpp if BAACK_WITHTEST -libBaack_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ +libBaack_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ else -libBaack_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ +libBaack_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ endif bin_PROGRAMS = diff --git a/Makefile.in b/Makefile.in index 7c136dc..1e2e493 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,17 +16,7 @@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -87,6 +77,8 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) @BAACK_WITHTEST_TRUE@am__append_1 = dynstack_test remotecontrol_test library_test @@ -94,18 +86,20 @@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) #basic_test_LDADD = libBaack.a #basic_test_CPPFLAGS = -Og -g @BAACK_WITHBENCH_TRUE@am__append_2 = dynstack_benchmark -subdir = . +subdir = baack +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/config/mkinstalldirs \ + $(top_srcdir)/config/depcomp $(nobase_include_HEADERS) README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(nobase_include_HEADERS) \ - $(am__DIST_COMMON) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = docs/Doxyfile +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -137,7 +131,6 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(includedir)" LIBRARIES = $(lib_LIBRARIES) -AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) @@ -165,16 +158,23 @@ am_libBaack_a_OBJECTS = \ libBaack_a_OBJECTS = $(am_libBaack_a_OBJECTS) libDynstack_a_AR = $(AR) $(ARFLAGS) libDynstack_a_LIBADD = -am_libDynstack_a_OBJECTS = dynstack/libDynstack_a-export.$(OBJEXT) +am__libDynstack_a_SOURCES_DIST = dynstack/export.cpp +@BAACK_WITH_DYNSTACK_TRUE@am_libDynstack_a_OBJECTS = dynstack/libDynstack_a-export.$(OBJEXT) libDynstack_a_OBJECTS = $(am_libDynstack_a_OBJECTS) libRemotecontrol_a_AR = $(AR) $(ARFLAGS) libRemotecontrol_a_LIBADD = -am_libRemotecontrol_a_OBJECTS = remote_control/communication/libRemotecontrol_a-packet.$(OBJEXT) \ - remote_control/communication/libRemotecontrol_a-message_queue.$(OBJEXT) \ - remote_control/libRemotecontrol_a-export.$(OBJEXT) \ - remote_control/control/libRemotecontrol_a-periodic_task.$(OBJEXT) \ - remote_control/control/libRemotecontrol_a-main_control.$(OBJEXT) \ - remote_control/control/libRemotecontrol_a-recv_cache.$(OBJEXT) +am__libRemotecontrol_a_SOURCES_DIST = remote_control/export.cpp \ + remote_control/communication/packet.cpp \ + remote_control/communication/message_queue.cpp \ + remote_control/control/periodic_task.cpp \ + remote_control/control/main_control.cpp \ + remote_control/control/recv_cache.cpp +@BAACK_WITH_REMOTECONTROL_TRUE@am_libRemotecontrol_a_OBJECTS = remote_control/libRemotecontrol_a-export.$(OBJEXT) \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/communication/libRemotecontrol_a-packet.$(OBJEXT) \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/communication/libRemotecontrol_a-message_queue.$(OBJEXT) \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/control/libRemotecontrol_a-periodic_task.$(OBJEXT) \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/control/libRemotecontrol_a-main_control.$(OBJEXT) \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/control/libRemotecontrol_a-recv_cache.$(OBJEXT) libRemotecontrol_a_OBJECTS = $(am_libRemotecontrol_a_OBJECTS) @BAACK_WITHTEST_TRUE@am__EXEEXT_1 = dynstack_test$(EXEEXT) \ @BAACK_WITHTEST_TRUE@ remotecontrol_test$(EXEEXT) \ @@ -187,6 +187,10 @@ am__dynstack_benchmark_SOURCES_DIST = benchmark/benchmark.cpp \ @BAACK_WITHBENCH_TRUE@ benchmark/stack/dynstack_benchmark-real.$(OBJEXT) dynstack_benchmark_OBJECTS = $(am_dynstack_benchmark_OBJECTS) @BAACK_WITHBENCH_TRUE@dynstack_benchmark_DEPENDENCIES = libDynstack.a +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = am__dynstack_test_SOURCES_DIST = test/dynstack/storage_test.cpp \ test/dynstack/advanced_test.cpp test/dynstack/unit_test.cpp \ test/dynstack/wrapper_test.cpp @@ -234,23 +238,24 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; @@ -259,8 +264,8 @@ SOURCES = $(libBaack_a_SOURCES) $(libDynstack_a_SOURCES) \ $(libRemotecontrol_a_SOURCES) $(dynstack_benchmark_SOURCES) \ $(dynstack_test_SOURCES) $(library_test_SOURCES) \ $(remotecontrol_test_SOURCES) -DIST_SOURCES = $(libBaack_a_SOURCES) $(libDynstack_a_SOURCES) \ - $(libRemotecontrol_a_SOURCES) \ +DIST_SOURCES = $(libBaack_a_SOURCES) $(am__libDynstack_a_SOURCES_DIST) \ + $(am__libRemotecontrol_a_SOURCES_DIST) \ $(am__dynstack_benchmark_SOURCES_DIST) \ $(am__dynstack_test_SOURCES_DIST) \ $(am__library_test_SOURCES_DIST) \ @@ -290,39 +295,48 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -CSCOPE = cscope -AM_RECURSIVE_TARGETS = cscope -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \ - $(top_srcdir)/docs/Doxyfile.in config/depcomp \ - config/install-sh config/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -am__post_remove_distdir = $(am__remove_distdir) -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -DIST_TARGETS = dist-gzip -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print VPATH = @srcdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BAACKLIBS = @BAACKLIBS@ BAACK_CPPFLAGS = @BAACK_CPPFLAGS@ +BERNIACTEXT_CPPFLAGS = @BERNIACTEXT_CPPFLAGS@ +BERNLIBS = @BERNLIBS@ +BERNNOATMEXT_CPPFLAGS = @BERNNOATMEXT_CPPFLAGS@ +BERN_CFLAGS = @BERN_CFLAGS@ +BERN_CPPFLAGS = @BERN_CPPFLAGS@ +BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@ +CAT_CMD = @CAT_CMD@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COAST_DIR = @COAST_DIR@ +COAST_LIBS = @COAST_LIBS@ +COAST_USER_LIB = @COAST_USER_LIB@ +CONEX_CPPFLAGS = @CONEX_CPPFLAGS@ +CONEX_DIR = @CONEX_DIR@ +CONEX_FFLAGS = @CONEX_FFLAGS@ +CONEX_LIB = @CONEX_LIB@ +CONEX_PARAM = @CONEX_PARAM@ +CORDETECTOR = @CORDETECTOR@ +CORHEMODEL = @CORHEMODEL@ +CORLEMODEL = @CORLEMODEL@ +CORSIKA_FFLAGS = @CORSIKA_FFLAGS@ +CORSIKA_LIBS = @CORSIKA_LIBS@ +CORSIKA_LIB_DIR = @CORSIKA_LIB_DIR@ +CORSIKA_NAME = @CORSIKA_NAME@ +CORSIKA_SUBDIRS = @CORSIKA_SUBDIRS@ +CORTIMELIB = @CORTIMELIB@ +CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXCOMP_FILE = @CXCOMP_FILE@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -330,25 +344,56 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DOXYGEN = @DOXYGEN@ +DLLTOOL = @DLLTOOL@ +DPM_FFLAGS = @DPM_FFLAGS@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ +EFIELD_CFLAGS = @EFIELD_CFLAGS@ EGREP = @EGREP@ +EPOS_FFLAGS = @EPOS_FFLAGS@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +FLIBS = @FLIBS@ +FLUKA_FFLAGS = @FLUKA_FFLAGS@ +FLUKA_LIBS = @FLUKA_LIBS@ +FLUPRO = @FLUPRO@ GREP = @GREP@ +HERWIG_DIR = @HERWIG_DIR@ +HIMODEL = @HIMODEL@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAP2PNG = @MAP2PNG@ MKDIR_P = @MKDIR_P@ +MODEL_LIBS = @MODEL_LIBS@ +MPICC = @MPICC@ +MPILIBS = @MPILIBS@ +MPIRUNNER_LIBS = @MPIRUNNER_LIBS@ +NEXUS_FFLAGS = @NEXUS_FFLAGS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -357,16 +402,34 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PLOTTRACKS = @PLOTTRACKS@ +PRECOMPILER_FLAGS = @PRECOMPILER_FLAGS@ +PRESHOWER_CFLAGS = @PRESHOWER_CFLAGS@ +PYTHIA_DIR = @PYTHIA_DIR@ +PYTHIA_FFLAGS = @PYTHIA_FFLAGS@ +PYTHIA_LIB = @PYTHIA_LIB@ RANLIB = @RANLIB@ +ROOTCINT = @ROOTCINT@ +ROOTSYS = @ROOTSYS@ +ROOT_CXXFLAGS = @ROOT_CXXFLAGS@ +ROOT_GLIBS = @ROOT_GLIBS@ +ROOT_LIBDIR = @ROOT_LIBDIR@ +ROOT_LIBS = @ROOT_LIBS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +URQMD_FFLAGS = @URQMD_FFLAGS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -374,14 +437,22 @@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -397,7 +468,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -407,21 +477,24 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign subdir-objects -AM_CXXFLAGS = -I$(top_srcdir) -pthread -std=c++14 -Wall -Wextra -Wnarrowing -pedantic @BAACK_CPPFLAGS@ +AM_CXXFLAGS = -I$(top_srcdir) -pthread -Wall -Wextra -pedantic @BAACK_CPPFLAGS@ nobase_include_HEADERS = -lib_LIBRARIES = libDynstack.a libRemotecontrol.a libBaack.a -libDynstack_a_SOURCES = dynstack/export.cpp -@BAACK_WITHTEST_FALSE@libDynstack_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ -@BAACK_WITHTEST_TRUE@libDynstack_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ -libRemotecontrol_a_SOURCES = remote_control/communication/packet.cpp \ - remote_control/communication/message_queue.cpp \ - remote_control/export.cpp \ - remote_control/control/periodic_task.cpp \ - remote_control/control/main_control.cpp \ - remote_control/control/recv_cache.cpp - -@BAACK_WITHTEST_FALSE@libRemotecontrol_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ -@BAACK_WITHTEST_TRUE@libRemotecontrol_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ +@BAACK_WITH_DYNSTACK_FALSE@@BAACK_WITH_REMOTECONTROL_FALSE@lib_LIBRARIES = +@BAACK_WITH_DYNSTACK_FALSE@@BAACK_WITH_REMOTECONTROL_TRUE@lib_LIBRARIES = libBaack.a libRemotecontrol.a +@BAACK_WITH_DYNSTACK_TRUE@@BAACK_WITH_REMOTECONTROL_FALSE@lib_LIBRARIES = libBaack.a libDynstack.a +@BAACK_WITH_DYNSTACK_TRUE@@BAACK_WITH_REMOTECONTROL_TRUE@lib_LIBRARIES = libBaack.a libDynstack.a libRemotecontrol.a +@BAACK_WITH_DYNSTACK_TRUE@libDynstack_a_SOURCES = dynstack/export.cpp +@BAACK_WITHTEST_FALSE@@BAACK_WITH_DYNSTACK_TRUE@libDynstack_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ +@BAACK_WITHTEST_TRUE@@BAACK_WITH_DYNSTACK_TRUE@libDynstack_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ +@BAACK_WITH_REMOTECONTROL_TRUE@libRemotecontrol_a_SOURCES = remote_control/export.cpp \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/communication/packet.cpp \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/communication/message_queue.cpp \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/control/periodic_task.cpp \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/control/main_control.cpp \ +@BAACK_WITH_REMOTECONTROL_TRUE@ remote_control/control/recv_cache.cpp + +@BAACK_WITHTEST_FALSE@@BAACK_WITH_REMOTECONTROL_TRUE@libRemotecontrol_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ +@BAACK_WITHTEST_TRUE@@BAACK_WITH_REMOTECONTROL_TRUE@libRemotecontrol_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ libBaack_a_SOURCES = lib/data/corsika/event_header.cpp \ lib/data/corsika/event_end.cpp \ lib/data/corsika/steering_card.cpp \ @@ -438,8 +511,8 @@ libBaack_a_SOURCES = lib/data/corsika/event_header.cpp \ basic/export.cpp \ basic/basic.cpp -@BAACK_WITHTEST_FALSE@libBaack_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ -@BAACK_WITHTEST_TRUE@libBaack_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ +@BAACK_WITHTEST_FALSE@libBaack_a_CPPFLAGS = -O3 -g @BAACK_CPPFLAGS@ +@BAACK_WITHTEST_TRUE@libBaack_a_CPPFLAGS = -Og -g @BAACK_CPPFLAGS@ @BAACK_WITHTEST_TRUE@dynstack_test_SOURCES = test/dynstack/storage_test.cpp \ @BAACK_WITHTEST_TRUE@ test/dynstack/advanced_test.cpp \ @BAACK_WITHTEST_TRUE@ test/dynstack/unit_test.cpp \ @@ -474,42 +547,37 @@ EXTRA_DIST = LICENSE README all: all-am .SUFFIXES: -.SUFFIXES: .cpp .o .obj -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign baack/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + $(AUTOMAKE) --foreign baack/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -@HAVE_DOXYGEN_TRUE@docs/Doxyfile: $(top_builddir)/config.status $(top_srcdir)/docs/Doxyfile.in -@HAVE_DOXYGEN_TRUE@ cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -623,6 +691,15 @@ libDynstack.a: $(libDynstack_a_OBJECTS) $(libDynstack_a_DEPENDENCIES) $(EXTRA_li $(AM_V_at)-rm -f libDynstack.a $(AM_V_AR)$(libDynstack_a_AR) libDynstack.a $(libDynstack_a_OBJECTS) $(libDynstack_a_LIBADD) $(AM_V_at)$(RANLIB) libDynstack.a +remote_control/$(am__dirstamp): + @$(MKDIR_P) remote_control + @: > remote_control/$(am__dirstamp) +remote_control/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) remote_control/$(DEPDIR) + @: > remote_control/$(DEPDIR)/$(am__dirstamp) +remote_control/libRemotecontrol_a-export.$(OBJEXT): \ + remote_control/$(am__dirstamp) \ + remote_control/$(DEPDIR)/$(am__dirstamp) remote_control/communication/$(am__dirstamp): @$(MKDIR_P) remote_control/communication @: > remote_control/communication/$(am__dirstamp) @@ -635,15 +712,6 @@ remote_control/communication/libRemotecontrol_a-packet.$(OBJEXT): \ remote_control/communication/libRemotecontrol_a-message_queue.$(OBJEXT): \ remote_control/communication/$(am__dirstamp) \ remote_control/communication/$(DEPDIR)/$(am__dirstamp) -remote_control/$(am__dirstamp): - @$(MKDIR_P) remote_control - @: > remote_control/$(am__dirstamp) -remote_control/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) remote_control/$(DEPDIR) - @: > remote_control/$(DEPDIR)/$(am__dirstamp) -remote_control/libRemotecontrol_a-export.$(OBJEXT): \ - remote_control/$(am__dirstamp) \ - remote_control/$(DEPDIR)/$(am__dirstamp) remote_control/control/$(am__dirstamp): @$(MKDIR_P) remote_control/control @: > remote_control/control/$(am__dirstamp) @@ -674,6 +742,7 @@ install-binPROGRAMS: $(bin_PROGRAMS) for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ + || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ @@ -688,8 +757,8 @@ install-binPROGRAMS: $(bin_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done @@ -705,7 +774,13 @@ uninstall-binPROGRAMS: cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list benchmark/$(am__dirstamp): @$(MKDIR_P) benchmark @: > benchmark/$(am__dirstamp) @@ -902,6 +977,14 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + lib/data/corsika/libBaack_a-event_header.o: lib/data/corsika/event_header.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libBaack_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib/data/corsika/libBaack_a-event_header.o -MD -MP -MF lib/data/corsika/$(DEPDIR)/libBaack_a-event_header.Tpo -c -o lib/data/corsika/libBaack_a-event_header.o `test -f 'lib/data/corsika/event_header.cpp' || echo '$(srcdir)/'`lib/data/corsika/event_header.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) lib/data/corsika/$(DEPDIR)/libBaack_a-event_header.Tpo lib/data/corsika/$(DEPDIR)/libBaack_a-event_header.Po @@ -1126,6 +1209,20 @@ dynstack/libDynstack_a-export.obj: dynstack/export.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libDynstack_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dynstack/libDynstack_a-export.obj `if test -f 'dynstack/export.cpp'; then $(CYGPATH_W) 'dynstack/export.cpp'; else $(CYGPATH_W) '$(srcdir)/dynstack/export.cpp'; fi` +remote_control/libRemotecontrol_a-export.o: remote_control/export.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT remote_control/libRemotecontrol_a-export.o -MD -MP -MF remote_control/$(DEPDIR)/libRemotecontrol_a-export.Tpo -c -o remote_control/libRemotecontrol_a-export.o `test -f 'remote_control/export.cpp' || echo '$(srcdir)/'`remote_control/export.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) remote_control/$(DEPDIR)/libRemotecontrol_a-export.Tpo remote_control/$(DEPDIR)/libRemotecontrol_a-export.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='remote_control/export.cpp' object='remote_control/libRemotecontrol_a-export.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o remote_control/libRemotecontrol_a-export.o `test -f 'remote_control/export.cpp' || echo '$(srcdir)/'`remote_control/export.cpp + +remote_control/libRemotecontrol_a-export.obj: remote_control/export.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT remote_control/libRemotecontrol_a-export.obj -MD -MP -MF remote_control/$(DEPDIR)/libRemotecontrol_a-export.Tpo -c -o remote_control/libRemotecontrol_a-export.obj `if test -f 'remote_control/export.cpp'; then $(CYGPATH_W) 'remote_control/export.cpp'; else $(CYGPATH_W) '$(srcdir)/remote_control/export.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) remote_control/$(DEPDIR)/libRemotecontrol_a-export.Tpo remote_control/$(DEPDIR)/libRemotecontrol_a-export.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='remote_control/export.cpp' object='remote_control/libRemotecontrol_a-export.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o remote_control/libRemotecontrol_a-export.obj `if test -f 'remote_control/export.cpp'; then $(CYGPATH_W) 'remote_control/export.cpp'; else $(CYGPATH_W) '$(srcdir)/remote_control/export.cpp'; fi` + remote_control/communication/libRemotecontrol_a-packet.o: remote_control/communication/packet.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT remote_control/communication/libRemotecontrol_a-packet.o -MD -MP -MF remote_control/communication/$(DEPDIR)/libRemotecontrol_a-packet.Tpo -c -o remote_control/communication/libRemotecontrol_a-packet.o `test -f 'remote_control/communication/packet.cpp' || echo '$(srcdir)/'`remote_control/communication/packet.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) remote_control/communication/$(DEPDIR)/libRemotecontrol_a-packet.Tpo remote_control/communication/$(DEPDIR)/libRemotecontrol_a-packet.Po @@ -1154,20 +1251,6 @@ remote_control/communication/libRemotecontrol_a-message_queue.obj: remote_contro @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o remote_control/communication/libRemotecontrol_a-message_queue.obj `if test -f 'remote_control/communication/message_queue.cpp'; then $(CYGPATH_W) 'remote_control/communication/message_queue.cpp'; else $(CYGPATH_W) '$(srcdir)/remote_control/communication/message_queue.cpp'; fi` -remote_control/libRemotecontrol_a-export.o: remote_control/export.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT remote_control/libRemotecontrol_a-export.o -MD -MP -MF remote_control/$(DEPDIR)/libRemotecontrol_a-export.Tpo -c -o remote_control/libRemotecontrol_a-export.o `test -f 'remote_control/export.cpp' || echo '$(srcdir)/'`remote_control/export.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) remote_control/$(DEPDIR)/libRemotecontrol_a-export.Tpo remote_control/$(DEPDIR)/libRemotecontrol_a-export.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='remote_control/export.cpp' object='remote_control/libRemotecontrol_a-export.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o remote_control/libRemotecontrol_a-export.o `test -f 'remote_control/export.cpp' || echo '$(srcdir)/'`remote_control/export.cpp - -remote_control/libRemotecontrol_a-export.obj: remote_control/export.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT remote_control/libRemotecontrol_a-export.obj -MD -MP -MF remote_control/$(DEPDIR)/libRemotecontrol_a-export.Tpo -c -o remote_control/libRemotecontrol_a-export.obj `if test -f 'remote_control/export.cpp'; then $(CYGPATH_W) 'remote_control/export.cpp'; else $(CYGPATH_W) '$(srcdir)/remote_control/export.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) remote_control/$(DEPDIR)/libRemotecontrol_a-export.Tpo remote_control/$(DEPDIR)/libRemotecontrol_a-export.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='remote_control/export.cpp' object='remote_control/libRemotecontrol_a-export.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o remote_control/libRemotecontrol_a-export.obj `if test -f 'remote_control/export.cpp'; then $(CYGPATH_W) 'remote_control/export.cpp'; else $(CYGPATH_W) '$(srcdir)/remote_control/export.cpp'; fi` - remote_control/control/libRemotecontrol_a-periodic_task.o: remote_control/control/periodic_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRemotecontrol_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT remote_control/control/libRemotecontrol_a-periodic_task.o -MD -MP -MF remote_control/control/$(DEPDIR)/libRemotecontrol_a-periodic_task.Tpo -c -o remote_control/control/libRemotecontrol_a-periodic_task.o `test -f 'remote_control/control/periodic_task.cpp' || echo '$(srcdir)/'`remote_control/control/periodic_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) remote_control/control/$(DEPDIR)/libRemotecontrol_a-periodic_task.Tpo remote_control/control/$(DEPDIR)/libRemotecontrol_a-periodic_task.Po @@ -1461,6 +1544,12 @@ test/remote_control/remotecontrol_test-unit_test.obj: test/remote_control/unit_t @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test/remote_control/unit_test.cpp' object='test/remote_control/remotecontrol_test-unit_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(remotecontrol_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/remote_control/remotecontrol_test-unit_test.obj `if test -f 'test/remote_control/unit_test.cpp'; then $(CYGPATH_W) 'test/remote_control/unit_test.cpp'; else $(CYGPATH_W) '$(srcdir)/test/remote_control/unit_test.cpp'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ @@ -1519,12 +1608,6 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) @@ -1543,11 +1626,8 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1577,137 +1657,6 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__post_remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) - -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__post_remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) @@ -1780,10 +1729,9 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLIBRARIES \ - mostlyclean-am + clean-libtool mostlyclean-am distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf basic/$(DEPDIR) benchmark/$(DEPDIR) benchmark/stack/$(DEPDIR) dynstack/$(DEPDIR) lib/data/corsika/$(DEPDIR) lib/io/$(DEPDIR) lib/io/network/$(DEPDIR) remote_control/$(DEPDIR) remote_control/communication/$(DEPDIR) remote_control/control/$(DEPDIR) test/dynstack/$(DEPDIR) test/lib/$(DEPDIR) test/lib/data/$(DEPDIR) test/lib/io/$(DEPDIR) test/lib/meta/$(DEPDIR) test/remote_control/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ @@ -1830,15 +1778,14 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache -rm -rf basic/$(DEPDIR) benchmark/$(DEPDIR) benchmark/stack/$(DEPDIR) dynstack/$(DEPDIR) lib/data/corsika/$(DEPDIR) lib/io/$(DEPDIR) lib/io/network/$(DEPDIR) remote_control/$(DEPDIR) remote_control/communication/$(DEPDIR) remote_control/control/$(DEPDIR) test/dynstack/$(DEPDIR) test/lib/$(DEPDIR) test/lib/data/$(DEPDIR) test/lib/io/$(DEPDIR) test/lib/meta/$(DEPDIR) test/remote_control/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -1853,14 +1800,12 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLIBRARIES \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ - clean-binPROGRAMS clean-cscope clean-generic \ - clean-libLIBRARIES cscope cscopelist-am ctags ctags-am dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-local distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libLIBRARIES \ + clean-libtool cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-local distclean-tags distdir dvi dvi-am html html-am \ + info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLIBRARIES install-man \ @@ -1868,11 +1813,9 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLIBRARIES \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-libLIBRARIES \ - uninstall-nobase_includeHEADERS - -.PRECIOUS: Makefile + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-libLIBRARIES uninstall-nobase_includeHEADERS # docu, if doxygen, CORSIKA so far never with doxygen diff --git a/configure.ac b/configure.ac index 34a39f6..03d616a 100644 --- a/configure.ac +++ b/configure.ac @@ -35,12 +35,17 @@ AC_ARG_WITH([test], AS_HELP_STRING([--with-test], [Compile all Tests])) AC_ARG_WITH([bench], AS_HELP_STRING([--with-bench], [Compile with benchmark])) AC_ARG_ENABLE([nococo], AS_HELP_STRING([--enable-nococo], [Enable compile without coconut])) +AC_ARG_WITH([dynstack], AS_HELP_STRING([--with-dynstack], [Compile dynstack library])) +AC_ARG_WITH([remotecontrol], AS_HELP_STRING([--with-remotecontrol], [Compile remotecontrol library])) + AS_IF([test "x$enable_nococo" = "xyes"], [ AC_DEFINE(_NOCOCO_, 1) AC_DEFINE(__DYNDEFAULT__, 1) BAACK_CPPFLAGS=" " AC_SUBST([BAACK_CPPFLAGS]) + AM_CONDITIONAL([BAACK_WITH_DYNSTACK], [test x = x]) + AM_CONDITIONAL([BAACK_WITH_REMOTECONTROL], [test x = x]) ]) AS_IF([test "x$with_test" = "xyes"], [ @@ -56,6 +61,20 @@ AS_IF([test "x$with_bench" = "xyes"], [ ]) +AS_IF([test "x$with_dynstack" = "xyes"], [ + AM_CONDITIONAL([BAACK_WITH_DYNSTACK], [test x = x]) +], [ + AM_CONDITIONAL([BAACK_WITH_DYNSTACK], [test x != x]) +]) + +AS_IF([test "x$with_remotecontrol" = "xyes"], [ + AM_CONDITIONAL([BAACK_WITH_REMOTECONTROL], [test x = x]) +], [ + AM_CONDITIONAL([BAACK_WITH_REMOTECONTROL], [test x != x]) +]) + + + AC_CHECK_LIB([pthread], [pthread_mutex_init], [ echo "pthread library is missing but required for dynstack"]) From 45097e52979ac7b72b8391b32c5f674f5dc8cf4b Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 14:11:49 +0200 Subject: [PATCH 02/13] Added modified basic directory --- basic/basic.cpp | 3 +++ basic/particle_deduction.h | 11 +++++++++++ basic/setup.h | 13 +++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 basic/setup.h diff --git a/basic/basic.cpp b/basic/basic.cpp index b0924ed..5879faa 100644 --- a/basic/basic.cpp +++ b/basic/basic.cpp @@ -10,6 +10,9 @@ #include "basic/basic.h" +#include +#include + Basic::Basic() { diff --git a/basic/particle_deduction.h b/basic/particle_deduction.h index 9ae6839..f12e1b0 100644 --- a/basic/particle_deduction.h +++ b/basic/particle_deduction.h @@ -85,5 +85,16 @@ using namespace lib::data; typedef decltype(lib::data::make_particle< DEDUCTED_PARTICLE_COMPOSITION >()) DeductedParticleType; +#if __cplusplus > 199711L template using DeductedParticleTypeCustom = decltype(lib::data::make_particle< DEDUCTED_PARTICLE_COMPOSITION, ParticleDataType::custom, TSize>()); +#else + +template +struct DeductedParticleTypeCustom +{ + typedef decltype(lib::data::make_particle< DEDUCTED_PARTICLE_COMPOSITION, ParticleDataType::custom, TSize>()) type; +}; +#endif + + diff --git a/basic/setup.h b/basic/setup.h new file mode 100644 index 0000000..a33f462 --- /dev/null +++ b/basic/setup.h @@ -0,0 +1,13 @@ +/* setup.h +* this file is part of Dynstack/RemoteControl for CORSIKA +* +* Copyright (C) <2016> +* All rights reserved. +* +* This software may be modified and distributed under the terms +* of the LGPL license. See the LICENSE file for details. +*/ + +#pragma once + + From da291b1c6d4c4d901ee0f83a59a52bd4e427812a Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 14:15:04 +0200 Subject: [PATCH 03/13] Added Dynstack modifications Bugfix in dynstack_p parsing Modifications for different C++ versions (98,11,14,17) Added C++98 multistack if, priority --- dynstack/export.cpp | 13 +- dynstack/stack/advanced/if_stack.h | 200 ++++++++++++++++++++++++ dynstack/stack/stack.h | 15 +- dynstack/stack/storage/fifo_stack.h | 6 +- dynstack/stack/storage/lifo_stack.h | 13 -- dynstack/stack/storage/lifo_std_stack.h | 6 - dynstack/stack/storage/null_stack.h | 6 - dynstack/stack/wrapper/priority_stack.h | 197 +++++++++++++++++++++++ 8 files changed, 416 insertions(+), 40 deletions(-) create mode 100644 dynstack/stack/advanced/if_stack.h create mode 100644 dynstack/stack/wrapper/priority_stack.h diff --git a/dynstack/export.cpp b/dynstack/export.cpp index 8d77140..26f5739 100644 --- a/dynstack/export.cpp +++ b/dynstack/export.cpp @@ -16,7 +16,7 @@ #include #include #include - +#include #include "dynstack/export.h" @@ -47,11 +47,20 @@ void dynstack_init_(const char* line, const int* size) std::string item; while (std::getline(sstr, item, ' ')) { - list.push_back(item); + if(item == " " || item == "") + { + continue; + } + else + { + list.push_back(item); + } } item = list.front(); list.pop_front(); + + std::cout << item << " with " << list.size() << std::endl; dynstack_steering_card.push_back( std::pair>(item, list) ); diff --git a/dynstack/stack/advanced/if_stack.h b/dynstack/stack/advanced/if_stack.h new file mode 100644 index 0000000..584a052 --- /dev/null +++ b/dynstack/stack/advanced/if_stack.h @@ -0,0 +1,200 @@ +/* if_stack.h +* this file is part of Dynstack/RemoteControl for CORSIKA +* +* Copyright (C) <2016> +* All rights reserved. +* +* This software may be modified and distributed under the terms +* of the LGPL license. See the LICENSE file for details. +*/ + +#pragma once + +#include "dynstack/stack/stack.h" + +#include +#include + + +namespace dynstack +{ + namespace advanced + { + + template + class IfStack : public Stack + { + static_assert(std::is_base_of<_Stack, TStackIf>::value, "TStackIf must be a Stack!"); + static_assert(std::is_base_of<_Stack, TStackElse>::value, "TStackElse must be a Stack!"); + static_assert(std::is_same::value, "TStackIf and TStackElse must store the same type"); + + + private: + + typedef typename TStackIf::m_ReturnType TType; + typedef typename TStackIf::m_StackType TTypeStack; + + TStackIf m_oStack_if; + TStackElse m_oStack_else; + + protected: + + + public: + + + template + IfStack(TArgs... args) + : m_oStack_if( args... ), m_oStack_else( args... ) + { } + + + + IfStack(IfStack && rhs) + : m_oStack_if( std::move(rhs.m_oStack_if) ), m_oStack_else( std::move(rhs.m_oStack_else) ) + { } + + ~IfStack() + { + } + + inline int push_back(const TType& data) + { + const bool decision = TFunc(&data); + + if (decision) + { + return m_oStack_if.push_back(data); + } + + + return m_oStack_else.push_back(data); + } + inline int push_back(TType&& data) + { + const bool decision = TFunc(&data); + + if (decision) + { + return m_oStack_if.push_back(data); + } + + + return m_oStack_else.push_back(data); + + } + + //Copys element to next free space + inline int push_back(std::unique_ptr data, const unsigned int elem) + { + int check = true; + for (unsigned int i = 0; i < elem; i++) + { + const bool decision = TFunc(&data[i]); + if (decision) + { + check = check | m_oStack_if.push_back(data[i]); + } + else + { + check = check | m_oStack_else.push_back(data[i]); + } + + } + return check; + + } + + inline int push_back(const TType* const data, const unsigned int elem) + { + int check = true; + for (unsigned int i = 0; i < elem; i++) + { + const bool decision = TFunc(data + i); + if (decision) + { + check = check | m_oStack_if.push_back(data[i]); + } + else + { + check = check | m_oStack_else.push_back(data[i]); + } + + } + return check; + } + + //Get last element without removing (copy) + inline TType back() + { + if (m_oStack_if.size() > 0) + { + return m_oStack_if.back(); + } + else + { + return m_oStack_else.back(); + } + return TType(); + } + + //Get last element with removing (move) + inline TType pop_back() + { + if (m_oStack_if.size() > 0) + { + return m_oStack_if.pop_back(); + } + else + { + return m_oStack_else.pop_back(); + } + return TType(); + } + + + // Removes last element from stack + // that was readed with back + inline bool pop() + { + if (m_oStack_if.size() > 0) + { + return m_oStack_if.pop(); + } + else + { + return m_oStack_else.pop(); + } + + return false; + } + + inline void clear() + { + m_oStack_if.clear(); + m_oStack_else.clear(); + } + + //Get new empty element to write into (direct access, zero copy) + StackPtr reserve() + { + return StackPtr(); + } + + + + inline unsigned long size() const + { + return m_oStack_if.size() + m_oStack_else.size(); + } + + unsigned long capacity() const + { + return m_oStack_if.capacity() + m_oStack_else.capacity(); + } + + + }; + } +} + diff --git a/dynstack/stack/stack.h b/dynstack/stack/stack.h index 3b33be0..ddeca52 100644 --- a/dynstack/stack/stack.h +++ b/dynstack/stack/stack.h @@ -13,7 +13,6 @@ #include #include -#include "dynstack/stack/stack_ptr.h" /// Main namespace for the dynstack package @@ -33,9 +32,9 @@ namespace dynstack { private: - static_assert(std::is_default_constructible::value, "Stack type needs a default constructor!"); - static_assert(std::is_copy_constructible::value, "Stack type needs a copy constructor!"); - static_assert(std::is_move_constructible::value, "Stack type needs a copy constructor!"); + //static_assert(std::is_default_constructible::value, "Stack type needs a default constructor!"); + //static_assert(std::is_copy_constructible::value, "Stack type needs a copy constructor!"); + //static_assert(std::is_move_constructible::value, "Stack type needs a copy constructor!"); protected: @@ -45,10 +44,10 @@ namespace dynstack Stack(const Stack& rhs) = delete; - inline StackPtr createStackObj(TReturn* const item, void (*del)(TStorage* const) = nullptr) const + /*inline StackPtr createStackObj(TReturn* const item, void (*del)(TStorage* const) = nullptr) const { return StackPtr(item, del); - } + }*/ public: @@ -80,9 +79,9 @@ namespace dynstack virtual void clear() = 0; - //Get new empty element to write into (direct access, zero copy) + /*//Get new empty element to write into (direct access, zero copy) virtual StackPtr reserve() = 0; - +*/ //Returns the number of currently stored elements virtual unsigned long size() const = 0; diff --git a/dynstack/stack/storage/fifo_stack.h b/dynstack/stack/storage/fifo_stack.h index cdea28a..50b54e8 100644 --- a/dynstack/stack/storage/fifo_stack.h +++ b/dynstack/stack/storage/fifo_stack.h @@ -15,7 +15,7 @@ #include #include "dynstack/stack/stack.h" -#include "dynstack/stack/stack_ptr.h" +//#include "dynstack/stack/stack_ptr.h" namespace dynstack { @@ -251,10 +251,6 @@ namespace dynstack * * \return Returns a pointer to new storage area without and precaution */ - inline StackPtr reserve() - { - return StackPtr(); - } inline unsigned long size() const { diff --git a/dynstack/stack/storage/lifo_stack.h b/dynstack/stack/storage/lifo_stack.h index 8bf474b..309e535 100644 --- a/dynstack/stack/storage/lifo_stack.h +++ b/dynstack/stack/storage/lifo_stack.h @@ -13,7 +13,6 @@ #include #include "dynstack/stack/stack.h" -#include "dynstack/stack/stack_ptr.h" namespace dynstack { @@ -165,18 +164,6 @@ namespace dynstack } - //Get new empty element to write into (direct access, zero copy) - inline StackPtr reserve() - { - const unsigned long off = getCurrentOffset(); - if (off < this->m_uiSize - 1) - { - m_tNextFree++; - - return Stack::createStackObj(m_tNextFree - 1); - } - return StackPtr(); - } diff --git a/dynstack/stack/storage/lifo_std_stack.h b/dynstack/stack/storage/lifo_std_stack.h index 9463147..5e0f5ca 100644 --- a/dynstack/stack/storage/lifo_std_stack.h +++ b/dynstack/stack/storage/lifo_std_stack.h @@ -147,12 +147,6 @@ namespace dynstack } - //Get new empty element to write into (direct access, zero copy) - inline StackPtr reserve() - { - return StackPtr(); - } - inline unsigned long size() const diff --git a/dynstack/stack/storage/null_stack.h b/dynstack/stack/storage/null_stack.h index b00dc55..b2a1682 100644 --- a/dynstack/stack/storage/null_stack.h +++ b/dynstack/stack/storage/null_stack.h @@ -100,12 +100,6 @@ namespace dynstack } - //Get new empty element to write into (direct access, zero copy) - StackPtr reserve() - { - return StackPtr(); - } - inline unsigned long size() const diff --git a/dynstack/stack/wrapper/priority_stack.h b/dynstack/stack/wrapper/priority_stack.h new file mode 100644 index 0000000..f9b3a38 --- /dev/null +++ b/dynstack/stack/wrapper/priority_stack.h @@ -0,0 +1,197 @@ +/* priority_stack.h +* this file is part of Dynstack/RemoteControl for CORSIKA +* +* Copyright (C) <2016> +* All rights reserved. +* +* This software may be modified and distributed under the terms +* of the LGPL license. See the LICENSE file for details. +*/ + +#pragma once + +#include "dynstack/stack/stack.h" + +#include +#include + + +namespace dynstack +{ + namespace wrapper + { + + template + class PriorityStack : public Stack + { + static_assert(std::is_base_of<_Stack, TStack>::value, "TStack must be a Stack!"); + + private: + + typedef typename TStack::m_ReturnType TType; + typedef typename TStack::m_StackType TTypeStack; + + TStack m_oStack_if; + TStack m_oStack_else; + + protected: + + + public: + + + template + PriorityStack(TArgs&&... args) + : m_oStack_if(std::forward(args)... ), m_oStack_else(std::forward(args)...) + { } + + + + PriorityStack(PriorityStack && rhs) + : m_oStack_if( std::move(rhs.m_oStack_if) ), m_oStack_else( std::move(rhs.m_oStack_else) ) + { } + + ~PriorityStack() + { + } + + inline int push_back(const TType& data) + { + const bool decision = TFunc(&data); + + if (decision) + { + return m_oStack_if.push_back(data); + } + + + return m_oStack_else.push_back(data); + } + inline int push_back(TType&& data) + { + const bool decision = TFunc(&data); + + if (decision) + { + return m_oStack_if.push_back(data); + } + + + return m_oStack_else.push_back(data); + + } + + //Copys element to next free space + inline int push_back(std::unique_ptr data, const unsigned int elem) + { + int check = true; + for (unsigned int i = 0; i < elem; i++) + { + const bool decision = TFunc(&data[i]); + if (decision) + { + check = check | m_oStack_if.push_back(data[i]); + } + else + { + check = check | m_oStack_else.push_back(data[i]); + } + + } + return check; + + } + + inline int push_back(const TType* const data, const unsigned int elem) + { + int check = true; + for (unsigned int i = 0; i < elem; i++) + { + const bool decision = TFunc(data + i); + if (decision) + { + check = check | m_oStack_if.push_back(data[i]); + } + else + { + check = check | m_oStack_else.push_back(data[i]); + } + + } + return check; + } + + //Get last element without removing (copy) + inline TType back() + { + if (m_oStack_if.size() > 0) + { + return m_oStack_if.back(); + } + else + { + return m_oStack_else.back(); + } + return TType(); + } + + //Get last element with removing (move) + inline TType pop_back() + { + if (m_oStack_if.size() > 0) + { + return m_oStack_if.pop_back(); + } + else + { + return m_oStack_else.pop_back(); + } + return TType(); + } + + + // Removes last element from stack + // that was readed with back + inline bool pop() + { + if (m_oStack_if.size() > 0) + { + return m_oStack_if.pop(); + } + else + { + return m_oStack_else.pop(); + } + + return false; + } + + inline void clear() + { + m_oStack_if.clear(); + m_oStack_else.clear(); + } + + //Get new empty element to write into (direct access, zero copy) + StackPtr reserve() + { + return StackPtr(); + } + + + + inline unsigned long size() const + { + return m_oStack_if.size() + m_oStack_else.size(); + } + + unsigned long capacity() const + { + return m_oStack_if.capacity() + m_oStack_else.capacity(); + } + + + }; + } +} + From 7431f88b2b9e5c1480fd444fe38277ae5951982d Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 14:19:39 +0200 Subject: [PATCH 04/13] Added modifications to lib Particle deduction added return value to auto server added usleep in case of missing index_sequence removed for old compiler --- lib/data/corsika/particle.h | 6 +++++- lib/io/file.cpp | 4 ++-- lib/io/file.h | 2 +- lib/io/network/server.cpp | 18 ++++++++++++++++-- lib/meta/index_sequence.h | 26 +++++++++++++++++++++++++- 5 files changed, 49 insertions(+), 7 deletions(-) diff --git a/lib/data/corsika/particle.h b/lib/data/corsika/particle.h index ce0495b..c371595 100644 --- a/lib/data/corsika/particle.h +++ b/lib/data/corsika/particle.h @@ -17,8 +17,12 @@ #include #include +#include + #include "lib/meta/index_sequence.h" + + namespace lib { @@ -690,7 +694,7 @@ namespace lib * \return returns a particle storage */ template - auto make_particle() + auto make_particle()->decltype(ParticleData<0, TArgs...>()) { return ParticleData<0, TArgs...>(); } diff --git a/lib/io/file.cpp b/lib/io/file.cpp index b622e8e..81fdc7a 100644 --- a/lib/io/file.cpp +++ b/lib/io/file.cpp @@ -14,7 +14,7 @@ #include -File::File(std::string p_fileName) +File::File(std::string p_fileName) { m_oFile.open( p_fileName, std::ios::in | std::ios::out | std::ios::binary ); @@ -29,7 +29,7 @@ File::File(std::string p_fileName) } } -File::File() +File::File() : statusOpen(false) { } diff --git a/lib/io/file.h b/lib/io/file.h index 8eca5c0..2c36a69 100644 --- a/lib/io/file.h +++ b/lib/io/file.h @@ -27,7 +27,7 @@ class File private: std::fstream m_oFile; - bool statusOpen = false; + bool statusOpen; public: diff --git a/lib/io/network/server.cpp b/lib/io/network/server.cpp index d98dd96..9468b04 100644 --- a/lib/io/network/server.cpp +++ b/lib/io/network/server.cpp @@ -11,6 +11,13 @@ #include "lib/io/network/server.h" #include +#include +#include + +#if __cplusplus > 199711L +#else +#include +#endif namespace lib { @@ -73,9 +80,11 @@ namespace lib m_functionMutex.unlock(); } } - +#if __cplusplus > 199711L std::this_thread::sleep_for(std::chrono::milliseconds(20)); - +#else + usleep(20000); +#endif this->m_actionMutex.lock(); for (unsigned int i = 0; i < m_action.size(); i++) @@ -85,7 +94,12 @@ namespace lib } this->m_actionMutex.unlock(); + +#if __cplusplus > 199711L std::this_thread::sleep_for(std::chrono::milliseconds(20)); +#else + usleep(20000); +#endif } } diff --git a/lib/meta/index_sequence.h b/lib/meta/index_sequence.h index c6debb0..d6653b7 100644 --- a/lib/meta/index_sequence.h +++ b/lib/meta/index_sequence.h @@ -63,9 +63,16 @@ namespace lib * \warning It is not save to call this with an empty parameter pack * \tparam T Parameter list to create indices from, only the size of T is actually used */ +#if __cplusplus > 199711L template using index_sequence_for = typename implementation::type; - +#else + template + struct index_sequence_for + { + typedef typename implementation::type type; + }; +#endif /// Index list for a spezific number /** @@ -73,8 +80,17 @@ namespace lib * \warning It is not save to call this with TStart<=0 * \tparam TStart Startparameter for the indice list */ +#if __cplusplus > 199711L template using index_sequence_from = typename implementation::type; +#else + template + struct index_sequence_from + { + typedef typename implementation::type type; + }; +#endif + /// Index list for a spezific number /** @@ -85,8 +101,16 @@ namespace lib * \tparam TBegin Startparameter for the indice list * \tparam TEnd Endparamter for the indice list */ +#if __cplusplus > 199711L template using index_sequence_from_to = typename implementation::type; +#else + template + struct index_sequence_from_to + { + typedef typename implementation::type type; + }; +#endif } From 3d24313b103953fd15cb8e9d7b4e222bed53a851 Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 14:24:00 +0200 Subject: [PATCH 05/13] Added Remotecontrol changes removed emplace (C++11) fixed remotecontrol_p --- remote_control/communication/packet.h | 2 ++ remote_control/export.cpp | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/remote_control/communication/packet.h b/remote_control/communication/packet.h index dd46012..d1db567 100644 --- a/remote_control/communication/packet.h +++ b/remote_control/communication/packet.h @@ -13,6 +13,8 @@ #include #include +#include + namespace remote_control { namespace communication diff --git a/remote_control/export.cpp b/remote_control/export.cpp index fa3ce65..39adeb2 100644 --- a/remote_control/export.cpp +++ b/remote_control/export.cpp @@ -34,15 +34,24 @@ void remotecontrol_init_(const char* line, const int* size) std::list list; std::string item; + while (std::getline(sstr, item, ' ')) { - list.push_back(item); + if(item == " " || item == "") + { + continue; + } + else + { + list.push_back(item); + } } + item = list.front(); list.pop_front(); - remotecontrol_steering_card.emplace(item, list); + remotecontrol_steering_card[item] = list; } From 04bc64b491c7dd65cbe5f1c3b41ac367d5f80cd8 Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 14:27:06 +0200 Subject: [PATCH 06/13] Added test for prioriy stack --- test/dynstack/unit_test.cpp | 3 +++ test/dynstack/wrapper_test.cpp | 12 ++++++++++++ test/dynstack/wrapper_test.h | 3 +++ 3 files changed, 18 insertions(+) diff --git a/test/dynstack/unit_test.cpp b/test/dynstack/unit_test.cpp index 97ff6c4..f72ea65 100644 --- a/test/dynstack/unit_test.cpp +++ b/test/dynstack/unit_test.cpp @@ -44,6 +44,9 @@ namespace test std::cout << "\n\t-Sorted-" << std::endl; test::dynstack::wrapper::Sorted(); + std::cout << "\n\t-Priority-" << std::endl; + test::dynstack::wrapper::Priority(); + std::cout << "\n\t-Combination-" << std::endl; test::dynstack::wrapper::Combinations(); } diff --git a/test/dynstack/wrapper_test.cpp b/test/dynstack/wrapper_test.cpp index c9c4d6c..5238182 100644 --- a/test/dynstack/wrapper_test.cpp +++ b/test/dynstack/wrapper_test.cpp @@ -137,6 +137,18 @@ namespace test } + bool prio(const float* const data) + { + return (*data % 2 == 0)?true, false; + } + bool Priority() + { + ::dynstack::wrapper::PriorityStack<::dynstack::storage::LIFO_Stack, sort> tmp1(12); + + testStack(tmp1, { { 1,2,3,4,5,6,7,8,9,10,11,12 } }, { { 12, 10, 8, 6, 4, 2, 11, 9, 7, 5, 3, 1 } }); + } + + bool Combinations() { std::cout << "Combination 1" << std::endl; diff --git a/test/dynstack/wrapper_test.h b/test/dynstack/wrapper_test.h index ce4997f..937489c 100644 --- a/test/dynstack/wrapper_test.h +++ b/test/dynstack/wrapper_test.h @@ -30,7 +30,10 @@ namespace test bool Sorted(); + bool Priority(); + bool Combinations(); + } } } From 7cbc59b85197a114df87d20dd313b5ba7e224041 Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 14:29:27 +0200 Subject: [PATCH 07/13] Added user_code changes Added icecube1 Changed emplace to [] added return value to auto --- user_code/dynstack_examples/default.h | 4 +- user_code/dynstack_examples/icecube1.h | 193 +++++++++++++++++++++++++ user_code/dynstack_examples/output.h | 13 +- user_code/dynstack_setup.h | 2 + user_code/remotecontrol_setup.h | 12 +- 5 files changed, 210 insertions(+), 14 deletions(-) create mode 100644 user_code/dynstack_examples/icecube1.h diff --git a/user_code/dynstack_examples/default.h b/user_code/dynstack_examples/default.h index 5d44876..64b74f1 100644 --- a/user_code/dynstack_examples/default.h +++ b/user_code/dynstack_examples/default.h @@ -19,11 +19,13 @@ #include -auto dynstack_setup(std::vector sizes, std::vector< std::list > arguments ) +auto dynstack_setup(std::vector sizes, std::vector< std::list > arguments ) -> decltype(std::unique_ptr< dynstack::storage::LIFO_Stack >()) { if(sizes.size() != 1) { std::cerr << "You need to define the size of a single stack with DYNSTACK N in the input card" << std::endl; + std::cerr << "You provided " << sizes.size() << " Arguments" << std::endl; + exit(-1); } const int stackSize = sizes[0]; diff --git a/user_code/dynstack_examples/icecube1.h b/user_code/dynstack_examples/icecube1.h new file mode 100644 index 0000000..6174821 --- /dev/null +++ b/user_code/dynstack_examples/icecube1.h @@ -0,0 +1,193 @@ +/* default.h +* this file is part of Dynstack/RemoteControl for ||IKA +* +* Copyright (C) <2016> +* All rights reserved. +* +* This software may be modified and distributed under the terms +* of the LGPL license. See the LICENSE file for details. +*/ +#pragma once + +#include "basic/particle_deduction.h" + +#include "basic/basic.h" + +#include "dynstack/stack/storage/fifo_stack.h" +#include "dynstack/stack/storage/lifo_stack.h" +//#include "dynstack/stack/wrapper/priority_stack.h" +#include "dynstack/stack/advanced/if_stack.h" +#include "dynstack/stack/wrapper/filter_stack.h" +#include "dynstack/stack/wrapper/in_callback_stack.h" +#include "dynstack/stack/wrapper/out_callback_stack.h" + + +#include +#include +#include +#include + + + +double energy_interesting; // ENERGY ABOVE WHICH PARTICLES ARE INTERESTING +int n_interesting; // NUMBER OF INTERESTING PARTICLES +int n_interesting_nu; // NUMBER OF INTERESTING NEUTRINOS +bool still_interesting; // FLAG INDICATING IF AN EVENT IS STILL INTERESTING + + +int first = 0; + +//FSTACK (read from stack) +void callback_out(const DeductedParticleType* const p) +{ + if(first < 2){return;} + // IF THE PARTICLE COMING FROM THE STACK IS INTERESTING DECREASE THE + // COUNTER BY 1 + if( !(p->data()[0] == 1 || p->data()[0] == 2 || + p->data()[0] == 3 || p->data()[0] == 5 || + p->data()[0] == 6 || p->data()[0] == 7 || + p->data()[0] == 16 || p->data()[0] == 17 || + p->data()[0] == 18 ) && + p->data()[1]*SBasic().particleRestMass(p->data()[0]) >= energy_interesting ) + + { + n_interesting = n_interesting - 1; + } + + // TSTEND (move from intermediate to final stack) + still_interesting = n_interesting > 0; +} + +int filter(const DeductedParticleType* const p) +{ + if(first < 2){return 0;} + + if(still_interesting) + { + return 0; // Keep particle + } + return -1; +} + +void callback_in(const DeductedParticleType* const p) +{ //To Stack (intermediate) + + first++; + if(first < 2){return;} + + // INCREASE NINTERSTING IF THE CURRENT SECPAR IS INTERESTING + const unsigned int particle_type = p->data()[0]; + if( !( particle_type == 1 || particle_type == 2 || + particle_type == 3 || particle_type == 5 || + particle_type == 6 || particle_type == 7 || + particle_type == 16 || particle_type == 17 || + particle_type == 18 ) && + p->data()[1]*SBasic().particleRestMass(particle_type) >= energy_interesting ) + { + // NEUTRINO PROGENITOR + n_interesting = n_interesting + 1; + } + else if( particle_type >= 66 && particle_type <= 69 && p->data()[1] >= energy_interesting ) + { // NEUTRINO + n_interesting = n_interesting + 1; + n_interesting_nu = n_interesting_nu + 1; + } + + +} + + + +bool sort_function(const DeductedParticleType* const p) +{ // TSTOUT Part + + if( n_interesting_nu > 0) + { + return true; + } + switch((int)p->data()[0]) + { + case 1: // Gamma + case 2: // e+ + case 3: // e- + case 5: // µ+ + case 6: // µ- + case 7: // pi_0 + case 16: // K^o_s + case 17: // \eta + case 18: // \Lambda + { + double pama = SBasic().particleRestMass((int)p->data()[0]); + if( p->data()[1]*pama >= energy_interesting) + { + return true; + } + break; + } + } + return false; +} + + +typedef dynstack::wrapper::FilterStack< + dynstack::wrapper::InputCallbackStack< + dynstack::wrapper::OutputCallbackStack< + dynstack::advanced::IfStack< + dynstack::storage::FIFO_Stack, + dynstack::storage::LIFO_Stack, + sort_function>, + callback_out>, + callback_in>, + filter> stacktype; + + + +auto dynstack_setup(std::vector sizes, std::vector< std::list > arguments ) -> decltype(std::unique_ptr< stacktype >()) +{ + if(sizes.size() != 1) + { + std::cerr << "You need to define the size of a single stack with DYNSTACK N in the input card" << std::endl; + std::cerr << "You provided " << sizes.size() << " Arguments" << std::endl; + + exit(-1); + } + const int stackSize = sizes[0]; + + + if(arguments.size() != 1) + { + std::cerr << "You need to define the energie limit in the input card with DYNSTACK_P" << std::endl; + std::cerr << "You provided " << arguments.size() << " Arguments" << std::endl; + exit(-1); + } + std::stringstream sstr; + sstr << arguments[0].front(); + sstr >> energy_interesting; + + std::cout << "Energiy cut of icecube1: " << energy_interesting << std::endl; + + + + //auto stack = std::make_unique< dynstack::storage::LIFO_Stack >(stackSize); + auto stack = std::unique_ptr< stacktype >(new stacktype(stackSize)); + + std::cout << "(dyn) Create default stack" << std::endl; + + return std::move(stack); +} + +inline void reset() +{ + still_interesting = true; + n_interesting = 0; + n_interesting_nu = 0; + + first = 0; +} + + +inline void close() {} + + + + diff --git a/user_code/dynstack_examples/output.h b/user_code/dynstack_examples/output.h index b0fda22..fe731f1 100644 --- a/user_code/dynstack_examples/output.h +++ b/user_code/dynstack_examples/output.h @@ -55,8 +55,13 @@ void callback_out(const DeductedParticleType* const p) } +typedef dynstack::wrapper::OutputCallbackStack< + dynstack::wrapper::InputCallbackStack< + dynstack::storage::LIFO_Stack, + callback_in>, + callback_out> stacktype; -auto dynstack_setup(std::vector sizes, std::vector< std::list > arguments ) +auto dynstack_setup(std::vector sizes, std::vector< std::list > arguments ) -> decltype(std::unique_ptr< stacktype >()) { if(sizes.size() != 1) { @@ -85,12 +90,6 @@ auto dynstack_setup(std::vector sizes, std::vector< std::list } std::cout << "(Dyn) Showerview file ready!" << std::endl; - - typedef dynstack::wrapper::OutputCallbackStack< - dynstack::wrapper::InputCallbackStack< - dynstack::storage::LIFO_Stack, - callback_in>, - callback_out> stacktype; auto stack = std::unique_ptr< stacktype >(new stacktype(size)); diff --git a/user_code/dynstack_setup.h b/user_code/dynstack_setup.h index eb9ffcf..2db1295 100644 --- a/user_code/dynstack_setup.h +++ b/user_code/dynstack_setup.h @@ -18,6 +18,8 @@ typedef DeductedParticleType Particle; #include "user_code/dynstack_examples/default.h" #elif __DYNOUTPUT__ #include "user_code/dynstack_examples/output.h" +#elif __DYNICECUBE__ +#include "user_code/dynstack_examples/icecube1.h" #elif __DYNCUSTOM__ #include #include diff --git a/user_code/remotecontrol_setup.h b/user_code/remotecontrol_setup.h index b28fcde..037292f 100644 --- a/user_code/remotecontrol_setup.h +++ b/user_code/remotecontrol_setup.h @@ -35,8 +35,8 @@ - -inline const auto register_periodic_callback() +// With feature level C++14 the decltype becomes uneccessary +inline const auto register_periodic_callback() -> std::array { /** User code here * Create your periodic tasks with lambda or a function pointer and the spacing. @@ -47,13 +47,13 @@ inline const auto register_periodic_callback() + std::array arr = {{ empty }}; - - return std::array({ empty }); + return arr;//std::array({ empty }); } -inline const auto register_server_callback() +inline const auto register_server_callback() -> std::map)>> { typedef std::function)> callback_type; std::map callback; @@ -76,7 +76,7 @@ inline const auto register_server_callback() }; - callback.emplace(0x301, call1 ); + callback[0x301] = call1; return callback; From 9fb17b2f1d3aed3c9f5610be4a8b9781e3ed05f3 Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 15:23:05 +0200 Subject: [PATCH 08/13] fixed issuese with test scripts --- Makefile.in | 403 +++++++++++++++++++-------------- configure | 130 ++++++++++- configure.ac | 21 +- test/dynstack/wrapper_test.cpp | 6 +- 4 files changed, 374 insertions(+), 186 deletions(-) diff --git a/Makefile.in b/Makefile.in index 1e2e493..46e11b0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -77,8 +87,6 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) @BAACK_WITHTEST_TRUE@am__append_1 = dynstack_test remotecontrol_test library_test @@ -86,20 +94,18 @@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) #basic_test_LDADD = libBaack.a #basic_test_CPPFLAGS = -Og -g @BAACK_WITHBENCH_TRUE@am__append_2 = dynstack_benchmark -subdir = baack -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/config/mkinstalldirs \ - $(top_srcdir)/config/depcomp $(nobase_include_HEADERS) README +subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(nobase_include_HEADERS) \ + $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = docs/Doxyfile CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -131,6 +137,7 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(includedir)" LIBRARIES = $(lib_LIBRARIES) +AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) @@ -187,10 +194,6 @@ am__dynstack_benchmark_SOURCES_DIST = benchmark/benchmark.cpp \ @BAACK_WITHBENCH_TRUE@ benchmark/stack/dynstack_benchmark-real.$(OBJEXT) dynstack_benchmark_OBJECTS = $(am_dynstack_benchmark_OBJECTS) @BAACK_WITHBENCH_TRUE@dynstack_benchmark_DEPENDENCIES = libDynstack.a -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = am__dynstack_test_SOURCES_DIST = test/dynstack/storage_test.cpp \ test/dynstack/advanced_test.cpp test/dynstack/unit_test.cpp \ test/dynstack/wrapper_test.cpp @@ -238,24 +241,23 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; @@ -295,48 +297,39 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \ + $(top_srcdir)/docs/Doxyfile.in config/depcomp \ + config/install-sh config/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print VPATH = @srcdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BAACKLIBS = @BAACKLIBS@ BAACK_CPPFLAGS = @BAACK_CPPFLAGS@ -BERNIACTEXT_CPPFLAGS = @BERNIACTEXT_CPPFLAGS@ -BERNLIBS = @BERNLIBS@ -BERNNOATMEXT_CPPFLAGS = @BERNNOATMEXT_CPPFLAGS@ -BERN_CFLAGS = @BERN_CFLAGS@ -BERN_CPPFLAGS = @BERN_CPPFLAGS@ -BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@ -CAT_CMD = @CAT_CMD@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COAST_DIR = @COAST_DIR@ -COAST_LIBS = @COAST_LIBS@ -COAST_USER_LIB = @COAST_USER_LIB@ -CONEX_CPPFLAGS = @CONEX_CPPFLAGS@ -CONEX_DIR = @CONEX_DIR@ -CONEX_FFLAGS = @CONEX_FFLAGS@ -CONEX_LIB = @CONEX_LIB@ -CONEX_PARAM = @CONEX_PARAM@ -CORDETECTOR = @CORDETECTOR@ -CORHEMODEL = @CORHEMODEL@ -CORLEMODEL = @CORLEMODEL@ -CORSIKA_FFLAGS = @CORSIKA_FFLAGS@ -CORSIKA_LIBS = @CORSIKA_LIBS@ -CORSIKA_LIB_DIR = @CORSIKA_LIB_DIR@ -CORSIKA_NAME = @CORSIKA_NAME@ -CORSIKA_SUBDIRS = @CORSIKA_SUBDIRS@ -CORTIMELIB = @CORTIMELIB@ -CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXCOMP_FILE = @CXCOMP_FILE@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -344,56 +337,25 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DPM_FFLAGS = @DPM_FFLAGS@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +DOXYGEN = @DOXYGEN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ -EFIELD_CFLAGS = @EFIELD_CFLAGS@ EGREP = @EGREP@ -EPOS_FFLAGS = @EPOS_FFLAGS@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FGREP = @FGREP@ -FLIBS = @FLIBS@ -FLUKA_FFLAGS = @FLUKA_FFLAGS@ -FLUKA_LIBS = @FLUKA_LIBS@ -FLUPRO = @FLUPRO@ GREP = @GREP@ -HERWIG_DIR = @HERWIG_DIR@ -HIMODEL = @HIMODEL@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MAP2PNG = @MAP2PNG@ MKDIR_P = @MKDIR_P@ -MODEL_LIBS = @MODEL_LIBS@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPIRUNNER_LIBS = @MPIRUNNER_LIBS@ -NEXUS_FFLAGS = @NEXUS_FFLAGS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -402,34 +364,16 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PLOTTRACKS = @PLOTTRACKS@ -PRECOMPILER_FLAGS = @PRECOMPILER_FLAGS@ -PRESHOWER_CFLAGS = @PRESHOWER_CFLAGS@ -PYTHIA_DIR = @PYTHIA_DIR@ -PYTHIA_FFLAGS = @PYTHIA_FFLAGS@ -PYTHIA_LIB = @PYTHIA_LIB@ RANLIB = @RANLIB@ -ROOTCINT = @ROOTCINT@ -ROOTSYS = @ROOTSYS@ -ROOT_CXXFLAGS = @ROOT_CXXFLAGS@ -ROOT_GLIBS = @ROOT_GLIBS@ -ROOT_LIBDIR = @ROOT_LIBDIR@ -ROOT_LIBS = @ROOT_LIBS@ -SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -URQMD_FFLAGS = @URQMD_FFLAGS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -437,22 +381,14 @@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ -build = @build@ build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -host = @host@ host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -468,6 +404,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -547,37 +484,42 @@ EXTRA_DIST = LICENSE README all: all-am .SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +.SUFFIXES: .cpp .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign baack/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign baack/Makefile -.PRECIOUS: Makefile + $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(SHELL) ./config.status --recheck -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): +@HAVE_DOXYGEN_TRUE@docs/Doxyfile: $(top_builddir)/config.status $(top_srcdir)/docs/Doxyfile.in +@HAVE_DOXYGEN_TRUE@ cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -742,7 +684,6 @@ install-binPROGRAMS: $(bin_PROGRAMS) for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ - || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ @@ -757,8 +698,8 @@ install-binPROGRAMS: $(bin_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done @@ -774,13 +715,7 @@ uninstall-binPROGRAMS: cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) benchmark/$(am__dirstamp): @$(MKDIR_P) benchmark @: > benchmark/$(am__dirstamp) @@ -977,14 +912,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -.cpp.lo: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< - lib/data/corsika/libBaack_a-event_header.o: lib/data/corsika/event_header.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libBaack_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib/data/corsika/libBaack_a-event_header.o -MD -MP -MF lib/data/corsika/$(DEPDIR)/libBaack_a-event_header.Tpo -c -o lib/data/corsika/libBaack_a-event_header.o `test -f 'lib/data/corsika/event_header.cpp' || echo '$(srcdir)/'`lib/data/corsika/event_header.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) lib/data/corsika/$(DEPDIR)/libBaack_a-event_header.Tpo lib/data/corsika/$(DEPDIR)/libBaack_a-event_header.Po @@ -1544,12 +1471,6 @@ test/remote_control/remotecontrol_test-unit_test.obj: test/remote_control/unit_t @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test/remote_control/unit_test.cpp' object='test/remote_control/remotecontrol_test-unit_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(remotecontrol_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/remote_control/remotecontrol_test-unit_test.obj `if test -f 'test/remote_control/unit_test.cpp'; then $(CYGPATH_W) 'test/remote_control/unit_test.cpp'; else $(CYGPATH_W) '$(srcdir)/test/remote_control/unit_test.cpp'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ @@ -1608,6 +1529,12 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) @@ -1626,8 +1553,11 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1657,6 +1587,137 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) @@ -1729,9 +1790,10 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLIBRARIES \ - clean-libtool mostlyclean-am + mostlyclean-am distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf basic/$(DEPDIR) benchmark/$(DEPDIR) benchmark/stack/$(DEPDIR) dynstack/$(DEPDIR) lib/data/corsika/$(DEPDIR) lib/io/$(DEPDIR) lib/io/network/$(DEPDIR) remote_control/$(DEPDIR) remote_control/communication/$(DEPDIR) remote_control/control/$(DEPDIR) test/dynstack/$(DEPDIR) test/lib/$(DEPDIR) test/lib/data/$(DEPDIR) test/lib/io/$(DEPDIR) test/lib/meta/$(DEPDIR) test/remote_control/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ @@ -1778,14 +1840,15 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache -rm -rf basic/$(DEPDIR) benchmark/$(DEPDIR) benchmark/stack/$(DEPDIR) dynstack/$(DEPDIR) lib/data/corsika/$(DEPDIR) lib/io/$(DEPDIR) lib/io/network/$(DEPDIR) remote_control/$(DEPDIR) remote_control/communication/$(DEPDIR) remote_control/control/$(DEPDIR) test/dynstack/$(DEPDIR) test/lib/$(DEPDIR) test/lib/data/$(DEPDIR) test/lib/io/$(DEPDIR) test/lib/meta/$(DEPDIR) test/remote_control/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool +mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am @@ -1800,12 +1863,14 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLIBRARIES \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ - clean-binPROGRAMS clean-generic clean-libLIBRARIES \ - clean-libtool cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-local distclean-tags distdir dvi dvi-am html html-am \ - info info-am install install-am install-binPROGRAMS \ +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ + clean-binPROGRAMS clean-cscope clean-generic \ + clean-libLIBRARIES cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-local distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLIBRARIES install-man \ @@ -1813,9 +1878,11 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLIBRARIES \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-libLIBRARIES uninstall-nobase_includeHEADERS + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-libLIBRARIES \ + uninstall-nobase_includeHEADERS + +.PRECIOUS: Makefile # docu, if doxygen, CORSIKA so far never with doxygen diff --git a/configure b/configure index 791c259..27a2a04 100755 --- a/configure +++ b/configure @@ -630,11 +630,15 @@ LIBOBJS EGREP GREP CXXCPP +BAACK_CPPFLAGS +BAACK_WITH_REMOTECONTROL_FALSE +BAACK_WITH_REMOTECONTROL_TRUE +BAACK_WITH_DYNSTACK_FALSE +BAACK_WITH_DYNSTACK_TRUE BAACK_WITHBENCH_FALSE BAACK_WITHBENCH_TRUE BAACK_WITHTEST_FALSE BAACK_WITHTEST_TRUE -BAACK_CPPFLAGS HAVE_DOXYGEN_FALSE HAVE_DOXYGEN_TRUE DOXYGEN @@ -731,6 +735,8 @@ enable_dependency_tracking with_test with_bench enable_nococo +with_dynstack +with_remotecontrol ' ac_precious_vars='build_alias host_alias @@ -1380,6 +1386,8 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-test Compile all Tests --with-bench Compile with benchmark + --with-dynstack Compile dynstack library + --with-remotecontrol Compile remotecontrol library Some influential environment variables: CXX C++ compiler command @@ -4012,16 +4020,18 @@ fi -if test "x$enable_nococo" = "xyes"; then : - - $as_echo "#define _NOCOCO_ 1" >>confdefs.h +# Check whether --with-dynstack was given. +if test "${with_dynstack+set}" = set; then : + withval=$with_dynstack; +fi - $as_echo "#define __DYNDEFAULT__ 1" >>confdefs.h - BAACK_CPPFLAGS=" " +# Check whether --with-remotecontrol was given. +if test "${with_remotecontrol+set}" = set; then : + withval=$with_remotecontrol; +fi -fi if test "x$with_test" = "xyes"; then : @@ -4072,6 +4082,88 @@ fi fi +if test "x$with_dynstack" = "xyes"; then : + + if test x = x; then + BAACK_WITH_DYNSTACK_TRUE= + BAACK_WITH_DYNSTACK_FALSE='#' +else + BAACK_WITH_DYNSTACK_TRUE='#' + BAACK_WITH_DYNSTACK_FALSE= +fi + + +else + + if test x != x; then + BAACK_WITH_DYNSTACK_TRUE= + BAACK_WITH_DYNSTACK_FALSE='#' +else + BAACK_WITH_DYNSTACK_TRUE='#' + BAACK_WITH_DYNSTACK_FALSE= +fi + + +fi + +if test "x$with_remotecontrol" = "xyes"; then : + + if test x = x; then + BAACK_WITH_REMOTECONTROL_TRUE= + BAACK_WITH_REMOTECONTROL_FALSE='#' +else + BAACK_WITH_REMOTECONTROL_TRUE='#' + BAACK_WITH_REMOTECONTROL_FALSE= +fi + + +else + + if test x != x; then + BAACK_WITH_REMOTECONTROL_TRUE= + BAACK_WITH_REMOTECONTROL_FALSE='#' +else + BAACK_WITH_REMOTECONTROL_TRUE='#' + BAACK_WITH_REMOTECONTROL_FALSE= +fi + + +fi + + +if test "x$enable_nococo" = "xyes"; then : + + $as_echo "#define _NOCOCO_ 1" >>confdefs.h + + $as_echo "#define __DYNDEFAULT__ 1" >>confdefs.h + + BAACK_CPPFLAGS=" " + + { $as_echo "$as_me:${as_lineno-$LINENO}: Activate Dynstack" >&5 +$as_echo "$as_me: Activate Dynstack" >&6;} + if test x = x; then + BAACK_WITH_DYNSTACK_TRUE= + BAACK_WITH_DYNSTACK_FALSE='#' +else + BAACK_WITH_DYNSTACK_TRUE='#' + BAACK_WITH_DYNSTACK_FALSE= +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: Activate Remotecontrol" >&5 +$as_echo "$as_me: Activate Remotecontrol" >&6;} + if test x = x; then + BAACK_WITH_REMOTECONTROL_TRUE= + BAACK_WITH_REMOTECONTROL_FALSE='#' +else + BAACK_WITH_REMOTECONTROL_TRUE='#' + BAACK_WITH_REMOTECONTROL_FALSE= +fi + + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } @@ -4912,6 +5004,30 @@ if test -z "${BAACK_WITHBENCH_TRUE}" && test -z "${BAACK_WITHBENCH_FALSE}"; then as_fn_error $? "conditional \"BAACK_WITHBENCH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BAACK_WITH_DYNSTACK_TRUE}" && test -z "${BAACK_WITH_DYNSTACK_FALSE}"; then + as_fn_error $? "conditional \"BAACK_WITH_DYNSTACK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BAACK_WITH_DYNSTACK_TRUE}" && test -z "${BAACK_WITH_DYNSTACK_FALSE}"; then + as_fn_error $? "conditional \"BAACK_WITH_DYNSTACK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BAACK_WITH_REMOTECONTROL_TRUE}" && test -z "${BAACK_WITH_REMOTECONTROL_FALSE}"; then + as_fn_error $? "conditional \"BAACK_WITH_REMOTECONTROL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BAACK_WITH_REMOTECONTROL_TRUE}" && test -z "${BAACK_WITH_REMOTECONTROL_FALSE}"; then + as_fn_error $? "conditional \"BAACK_WITH_REMOTECONTROL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BAACK_WITH_DYNSTACK_TRUE}" && test -z "${BAACK_WITH_DYNSTACK_FALSE}"; then + as_fn_error $? "conditional \"BAACK_WITH_DYNSTACK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BAACK_WITH_REMOTECONTROL_TRUE}" && test -z "${BAACK_WITH_REMOTECONTROL_FALSE}"; then + as_fn_error $? "conditional \"BAACK_WITH_REMOTECONTROL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 diff --git a/configure.ac b/configure.ac index 03d616a..ab448d1 100644 --- a/configure.ac +++ b/configure.ac @@ -39,15 +39,6 @@ AC_ARG_WITH([dynstack], AS_HELP_STRING([--with-dynstack], [Compile dynstack libr AC_ARG_WITH([remotecontrol], AS_HELP_STRING([--with-remotecontrol], [Compile remotecontrol library])) -AS_IF([test "x$enable_nococo" = "xyes"], [ - AC_DEFINE(_NOCOCO_, 1) - AC_DEFINE(__DYNDEFAULT__, 1) - BAACK_CPPFLAGS=" " - AC_SUBST([BAACK_CPPFLAGS]) - AM_CONDITIONAL([BAACK_WITH_DYNSTACK], [test x = x]) - AM_CONDITIONAL([BAACK_WITH_REMOTECONTROL], [test x = x]) -]) - AS_IF([test "x$with_test" = "xyes"], [ AM_CONDITIONAL([BAACK_WITHTEST], [test x = x]) ], [ @@ -74,6 +65,18 @@ AS_IF([test "x$with_remotecontrol" = "xyes"], [ ]) +AS_IF([test "x$enable_nococo" = "xyes"], [ + AC_DEFINE(_NOCOCO_, 1) + AC_DEFINE(__DYNDEFAULT__, 1) + BAACK_CPPFLAGS=" " + AC_SUBST([BAACK_CPPFLAGS]) + AC_MSG_NOTICE([Activate Dynstack]) + AM_CONDITIONAL([BAACK_WITH_DYNSTACK], [test x = x]) + AC_MSG_NOTICE([Activate Remotecontrol]) + AM_CONDITIONAL([BAACK_WITH_REMOTECONTROL], [test x = x]) +]) + + AC_CHECK_LIB([pthread], [pthread_mutex_init], [ echo "pthread library is missing but required for dynstack"]) diff --git a/test/dynstack/wrapper_test.cpp b/test/dynstack/wrapper_test.cpp index 5238182..45796f6 100644 --- a/test/dynstack/wrapper_test.cpp +++ b/test/dynstack/wrapper_test.cpp @@ -17,6 +17,8 @@ #include "dynstack/stack/storage/lifo_stack.h" #include "dynstack/stack/advanced/debug_stack.h" +#include "dynstack/stack/wrapper/priority_stack.h" + #include "lib/data/controlled_value.h" @@ -139,11 +141,11 @@ namespace test bool prio(const float* const data) { - return (*data % 2 == 0)?true, false; + return (static_cast(*data) % 2 == 0)?true : false; } bool Priority() { - ::dynstack::wrapper::PriorityStack<::dynstack::storage::LIFO_Stack, sort> tmp1(12); + ::dynstack::wrapper::PriorityStack<::dynstack::storage::LIFO_Stack, prio> tmp1(12); testStack(tmp1, { { 1,2,3,4,5,6,7,8,9,10,11,12 } }, { { 12, 10, 8, 6, 4, 2, 11, 9, 7, 5, 3, 1 } }); } From 8abcb6b64ec04daa30835b103a28d4ee9812e793 Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 15:30:20 +0200 Subject: [PATCH 09/13] Added C++0x modifier to nococo, in future compiler version should be checked automatic --- configure | 3 +++ configure.ac | 3 +++ 2 files changed, 6 insertions(+) diff --git a/configure b/configure index 27a2a04..9f87341 100755 --- a/configure +++ b/configure @@ -4137,7 +4137,10 @@ if test "x$enable_nococo" = "xyes"; then : $as_echo "#define __DYNDEFAULT__ 1" >>confdefs.h + BAACK_CPPFLAGS=" " + BAACK_CPPFLAGS="$BAACK_CPPFLAGS -std=c++0x" + { $as_echo "$as_me:${as_lineno-$LINENO}: Activate Dynstack" >&5 $as_echo "$as_me: Activate Dynstack" >&6;} diff --git a/configure.ac b/configure.ac index ab448d1..9a0e1f7 100644 --- a/configure.ac +++ b/configure.ac @@ -68,8 +68,11 @@ AS_IF([test "x$with_remotecontrol" = "xyes"], [ AS_IF([test "x$enable_nococo" = "xyes"], [ AC_DEFINE(_NOCOCO_, 1) AC_DEFINE(__DYNDEFAULT__, 1) + BAACK_CPPFLAGS=" " + BAACK_CPPFLAGS="$BAACK_CPPFLAGS -std=c++0x" AC_SUBST([BAACK_CPPFLAGS]) + AC_MSG_NOTICE([Activate Dynstack]) AM_CONDITIONAL([BAACK_WITH_DYNSTACK], [test x = x]) AC_MSG_NOTICE([Activate Remotecontrol]) From 56d174619cf961d7ece9767c2feddd0a9aa6c004 Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 15:35:38 +0200 Subject: [PATCH 10/13] Changed 0x to 14 for travis --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 9f87341..223fcfe 100755 --- a/configure +++ b/configure @@ -4139,7 +4139,7 @@ if test "x$enable_nococo" = "xyes"; then : BAACK_CPPFLAGS=" " - BAACK_CPPFLAGS="$BAACK_CPPFLAGS -std=c++0x" + BAACK_CPPFLAGS="$BAACK_CPPFLAGS -std=c++14" { $as_echo "$as_me:${as_lineno-$LINENO}: Activate Dynstack" >&5 diff --git a/configure.ac b/configure.ac index 9a0e1f7..48e7a89 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,7 @@ AS_IF([test "x$enable_nococo" = "xyes"], [ AC_DEFINE(__DYNDEFAULT__, 1) BAACK_CPPFLAGS=" " - BAACK_CPPFLAGS="$BAACK_CPPFLAGS -std=c++0x" + BAACK_CPPFLAGS="$BAACK_CPPFLAGS -std=c++14" AC_SUBST([BAACK_CPPFLAGS]) AC_MSG_NOTICE([Activate Dynstack]) From 9fa1a08ea42ea1b59312b465f29659cd056f1399 Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Tue, 13 Jun 2017 15:49:27 +0200 Subject: [PATCH 11/13] fixed clang issue with auto type deduction --- user_code/remotecontrol_setup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_code/remotecontrol_setup.h b/user_code/remotecontrol_setup.h index 037292f..c04b279 100644 --- a/user_code/remotecontrol_setup.h +++ b/user_code/remotecontrol_setup.h @@ -36,7 +36,7 @@ // With feature level C++14 the decltype becomes uneccessary -inline const auto register_periodic_callback() -> std::array +inline auto register_periodic_callback() -> const std::array { /** User code here * Create your periodic tasks with lambda or a function pointer and the spacing. @@ -53,7 +53,7 @@ inline const auto register_periodic_callback() -> std::array std::map)>> +inline auto register_server_callback() -> const std::map)>> { typedef std::function)> callback_type; std::map callback; From 407badbbed7738ba26acf479c9be87baa382856a Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Wed, 14 Jun 2017 00:02:08 +0200 Subject: [PATCH 12/13] Added return value to priority test --- test/dynstack/wrapper_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/dynstack/wrapper_test.cpp b/test/dynstack/wrapper_test.cpp index 45796f6..c445e7a 100644 --- a/test/dynstack/wrapper_test.cpp +++ b/test/dynstack/wrapper_test.cpp @@ -148,7 +148,9 @@ namespace test ::dynstack::wrapper::PriorityStack<::dynstack::storage::LIFO_Stack, prio> tmp1(12); testStack(tmp1, { { 1,2,3,4,5,6,7,8,9,10,11,12 } }, { { 12, 10, 8, 6, 4, 2, 11, 9, 7, 5, 3, 1 } }); - } + + return true; + } bool Combinations() From db7bdcbc88161e8b82cbbdb6ccf88d3afabd8a1a Mon Sep 17 00:00:00 2001 From: Dominik Baack Date: Fri, 16 Jun 2017 14:35:33 +0200 Subject: [PATCH 13/13] Added IfStack test --- Makefile.am | 2 +- Makefile.in | 2 +- test/dynstack/advanced_test.cpp | 26 ++++++++++++++++++++++++++ test/dynstack/advanced_test.h | 4 +++- test/dynstack/unit_test.cpp | 5 ++++- 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 68021fb..db132a5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ VPATH = @srcdir@ AUTOMAKE_OPTIONS = foreign subdir-objects -AM_CXXFLAGS = -I$(top_srcdir) -pthread -Wall -Wextra -pedantic @BAACK_CPPFLAGS@ +AM_CXXFLAGS = -I$(top_srcdir) -pthread -Wall -Wextra -pedantic -Werror=return-type @BAACK_CPPFLAGS@ diff --git a/Makefile.in b/Makefile.in index 46e11b0..424c999 100644 --- a/Makefile.in +++ b/Makefile.in @@ -414,7 +414,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign subdir-objects -AM_CXXFLAGS = -I$(top_srcdir) -pthread -Wall -Wextra -pedantic @BAACK_CPPFLAGS@ +AM_CXXFLAGS = -I$(top_srcdir) -pthread -Wall -Wextra -pedantic -Werror=return-type @BAACK_CPPFLAGS@ nobase_include_HEADERS = @BAACK_WITH_DYNSTACK_FALSE@@BAACK_WITH_REMOTECONTROL_FALSE@lib_LIBRARIES = @BAACK_WITH_DYNSTACK_FALSE@@BAACK_WITH_REMOTECONTROL_TRUE@lib_LIBRARIES = libBaack.a libRemotecontrol.a diff --git a/test/dynstack/advanced_test.cpp b/test/dynstack/advanced_test.cpp index 9107570..2984921 100644 --- a/test/dynstack/advanced_test.cpp +++ b/test/dynstack/advanced_test.cpp @@ -21,6 +21,7 @@ #include "dynstack/stack/advanced/debug_stack.h" #include "dynstack/stack/advanced/copy_stack.h" #include "dynstack/stack/advanced/dynamic_sorted_stack.h" +#include "dynstack/stack/advanced/if_stack.h" #include "test/dynstack/common_test_function.h" @@ -87,6 +88,31 @@ namespace test return true; } + + + + bool if_decision(const float* const data) + { + if( static_cast(*data) % 2 == 0) + { + return false; + } + return true; + } + + bool If() + { + ::dynstack::advanced::IfStack< + ::dynstack::storage::FIFO_Stack, + ::dynstack::storage::LIFO_Stack, + if_decision > tmp1(12); + + testStack(tmp1, { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 } }, { { 1, 3, 5, 7, 9, 11, 12, 10, 8, 6, 4, 2 } }); + + return true; + } + + bool Combinations() diff --git a/test/dynstack/advanced_test.h b/test/dynstack/advanced_test.h index f96b469..3d44ca4 100644 --- a/test/dynstack/advanced_test.h +++ b/test/dynstack/advanced_test.h @@ -29,7 +29,9 @@ namespace test bool Copy(); bool DynamicSorted(); - } + + bool If(); + } } } diff --git a/test/dynstack/unit_test.cpp b/test/dynstack/unit_test.cpp index f72ea65..b2a4ca4 100644 --- a/test/dynstack/unit_test.cpp +++ b/test/dynstack/unit_test.cpp @@ -61,7 +61,10 @@ namespace test std::cout << "\n\t-Dynamic Sorted-" << std::endl; test::dynstack::advanced::DynamicSorted(); - } + + std::cout << "\n\t-If-" << std::endl; + test::dynstack::advanced::If(); + } }