Browse Source

C++ 11, options for clang and gcc

synchronous
Volker Birk 5 years ago
parent
commit
87829c5dc4
  1. 2
      Adapter.hh
  2. 1
      Adapter.hxx
  3. 14
      Makefile.conf

2
Adapter.hh

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

1
Adapter.hxx

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

14
Makefile.conf

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

Loading…
Cancel
Save