C++ 11, options for clang and gcc

synchronous
Volker Birk 2020-04-30 13:52:36 +02:00
parent b7d8c06d79
commit 87829c5dc4
3 changed files with 6 additions and 11 deletions

View File

@ -31,7 +31,7 @@ namespace pEp {
T *obj = nullptr,
std::function< void (T *) > _startup = nullptr,
std::function< void (T *) > _shutdown = nullptr
) throw (RuntimeError);
);
// returns 'true' when called from the "sync" thread, 'false' otherwise.
bool on_sync_thread();

View File

@ -66,7 +66,6 @@ namespace pEp {
function< void(T *) > _startup,
function< void(T *) > _shutdown
)
throw (RuntimeError)
{
if (messageToSend)
_messageToSend = messageToSend;

View File

@ -7,19 +7,15 @@ HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
PREFIX=$(HOME)
CXXFLAGS=-std=c++11
CXXFLAGS=-std=c++11 -fPIC -O0 $(ENGINE_INC)
# Build target
BUILD_FOR:=$(shell uname)
ifeq ($(BUILD_FOR),Linux)
$(info Building for Linux)
CXX=g++
CXXFLAGS+=-fdiagnostics-color=always -O0 $(ENGINE_INC) -fPIC
else ifeq ($(BUILD_FOR),Darwin)
$(info Building for Darwin)
CXX=clang
CXXFLAGS+=-fcolor-diagnostics -O0 $(ENGINE_INC)
ifneq (,$(findstring g++,$(CXX)))
CXXFLAGS+=-fdiagnostics-color=always
else ifneq (,$(findstring clang,$(CXX)))
CXXFLAGS+=-fcolor-diagnostics
endif
# Debug or Release build