Commit 9145c93d authored by Axel Auweter's avatar Axel Auweter
Browse files

Further fixes to Makefile and cxx11flags.sh.

parent 404bbbc4
include ../config.mk
CXXFLAGS = -O0 -g -Wall -Wno-null-conversion -std=c++11 -stdlib=libc++ -fmessage-length=0 -I$(DCDBDEPLOYPATH)/include/
CXXFLAGS = $(shell ./cxx11flags.sh $(CXX) -O0 -g -Wall -Wno-null-conversion -fmessage-length=0 -I$(DCDBDEPLOYPATH)/include/)
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 -lc++
LIBS = -L$(DCDBDEPLOYPATH)/lib/ -lthrift -lmosquitto -lssl -lcrypto -lpthread -lboost_system
TARGET = collectagent
SUBTARGETS = cassandra/Cassandra.h
......
......@@ -5,14 +5,18 @@ CXX=$1
shift 1
FLAGS+=$*
cat << EOF | $CXX -c $FLAGS -x c++ - -o /dev/null &>/dev/null
cat << EOF | $CXX $FLAGS -x c++ - -o /dev/null &>/dev/null
#include <system_error>
int main() {return 0;}
int main() {
std::system_error e(0, std::system_category(), "");
return 0;
}
EOF
}
if [ "$#" -lt "1" ]; then
echo "C++11 Compiler Flags Checker"
echo "Usage: $0 <C++_compiler_name> [additional compiler flags]"
exit 0
fi
......@@ -26,7 +30,7 @@ if [ "$?" -eq "0" ]; then
fi
# Test c++ 11 flags for llvm clang
FLAGS="-std=c++11 -stdlib=libc++ "
FLAGS="-std=c++11 -stdlib=libc++ -lc++ "
test_flags $@
if [ "$?" -eq "0" ]; then
echo $FLAGS
......
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