Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit cfdc54f6 authored by Axel Auweter's avatar Axel Auweter
Browse files

And more fixes to Makefile and cxx11flags.sh...

parent 9145c93d
include ../config.mk
CXXFLAGS = $(shell ./cxx11flags.sh $(CXX) -O0 -g -Wall -Wno-null-conversion -fmessage-length=0 -I$(DCDBDEPLOYPATH)/include/)
CXXFLAGS = $(shell ./cxx11flags.sh $(CXX) -O0 -g -Wall -Wno-null-conversion -fmessage-length=0 -I$(DCDBDEPLOYPATH)/include/ | head -1)
OBJS = collectagent.o simplemqttserver.o simplemqttserverthread.o cassandra/Cassandra.o cassandra/cassandra_constants.o cassandra/cassandra_types.o
SRC = $(patsubst cassandra/%,,$(OBJS:.o=.cpp))
LIBS = -L$(DCDBDEPLOYPATH)/lib/ -lthrift -lmosquitto -lssl -lcrypto -lpthread -lboost_system
LIBS = $(shell ./cxx11flags.sh $(CXX) -L$(DCDBDEPLOYPATH)/lib/ -lthrift -lmosquitto -lssl -lcrypto -lpthread -lboost_system | tail -1)
TARGET = collectagent
SUBTARGETS = cassandra/Cassandra.h
......
#!/bin/bash
function test_flags {
CFLAGSOK=0
LFLAGSOK=0
function test_cflags {
CXX=$1
shift 1
FLAGS+=$*
cat << EOF | $CXX $FLAGS -x c++ - -o /dev/null &>/dev/null
cat << EOF | $CXX $FLAGS -c -x c++ - -o $TMPFILE1 &>/dev/null
#include <system_error>
int main() {
std::system_error e(0, std::system_category(), "");
return 0;
}
EOF
}
function test_lflags {
CXX=$1
shift 1
FLAGS+=$*
$CXX $FLAGS -o $TMPFILE2 $TMPFILE1 &>/dev/null
}
if [ "$#" -lt "1" ]; then
......@@ -21,23 +31,59 @@ if [ "$#" -lt "1" ]; then
exit 0
fi
# Create a temporary file for the C++ compiler output.
tempdir=`basename $0`
TMPFILE1=`mktemp -t ${tempdir}` || exit 1
TMPFILE2=`mktemp -t ${tempdir}` || exit 1
# Test c++ 11 flags for g++...
if [ "$CFLAGSOK" -eq "0" ]; then
FLAGS="--std=c++11 "
test_flags $@
test_cflags $@
if [ "$?" -eq "0" ]; then
echo $FLAGS
exit 0
CFLAGSOK=1
goto
fi
fi
# Test c++ 11 flags for llvm clang
FLAGS="-std=c++11 -stdlib=libc++ -lc++ "
test_flags $@
if [ "$CFLAGSOK" -eq "0" ]; then
FLAGS="-std=c++11 -stdlib=libc++ "
test_cflags $@
if [ "$?" -eq "0" ]; then
echo $FLAGS
exit 0
CFLAGSOK=1
fi
fi
# No idea how to get c++11 code compiled on this machine -> return error!
exit 1
if [ "$CFLAGSOK" -eq "0" ]; then
exit 1
fi
# Test c++ 11 linker flags for g++ (nothing required)
if [ "$LFLAGSOK" -eq "0" ]; then
FLAGS=" "
test_lflags $@
if [ "$?" -eq "0" ]; then
echo $FLAGS
LFLAGSOK=1
fi
fi
# Test c++ 11 linker flags for llvm clang
if [ "$LFLAGSOK" -eq "0" ]; then
FLAGS="-lc++ "
test_lflags $@
if [ "$?" -eq "0" ]; then
echo $FLAGS
LFLAGSOK=1
fi
fi
# No idea how to get c++11 code linked on this machine -> return error!
if [ "$LFLAGSOK" -eq "0" ]; then
exit 1
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment