Cpp17 support has been added
Summary: Cpp17 support has been added Reviewers: mferencevic, dgleich, mislav.bradac, florijan Reviewed By: mislav.bradac Subscribers: pullbot, buda Differential Revision: https://phabricator.memgraph.io/D57
This commit is contained in:
parent
7a647dffca
commit
d1842571d6
@ -13,7 +13,7 @@ BASE_FLAGS = [
|
|||||||
'-fexceptions',
|
'-fexceptions',
|
||||||
'-ferror-limit=10000',
|
'-ferror-limit=10000',
|
||||||
'-DNDEBUG',
|
'-DNDEBUG',
|
||||||
'-std=c++1y',
|
'-std=c++1z',
|
||||||
'-xc++',
|
'-xc++',
|
||||||
'-I/usr/lib/',
|
'-I/usr/lib/',
|
||||||
'-I/usr/include/',
|
'-I/usr/include/',
|
||||||
|
@ -38,8 +38,9 @@ find_package(Threads REQUIRED)
|
|||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
# c++14
|
# c++14
|
||||||
|
# TODO: set here 17 once it will be available in the cmake version (3.8)
|
||||||
set(cxx_standard 14)
|
set(cxx_standard 14)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z")
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
# dir variables
|
# dir variables
|
||||||
@ -54,9 +55,9 @@ set(test_src_dir ${CMAKE_BINARY_DIR}/tests/src)
|
|||||||
|
|
||||||
# build flags -----------------------------------------------------------------
|
# build flags -----------------------------------------------------------------
|
||||||
# release flags
|
# release flags
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -Wno-c++1z-extensions")
|
||||||
#debug flags
|
#debug flags
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wno-c++1z-extensions")
|
||||||
|
|
||||||
# compiler specific flags
|
# compiler specific flags
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
|
@ -5,15 +5,12 @@
|
|||||||
|
|
||||||
#include "logging/log.hpp"
|
#include "logging/log.hpp"
|
||||||
|
|
||||||
// TODO: in c++17 replace with logging::format
|
namespace logging::format {
|
||||||
namespace logging {
|
// TODO: read formats from the config
|
||||||
namespace format {
|
|
||||||
static const std::string out = "{} {:<5} [{}] {}\n";
|
static const std::string out = "{} {:<5} [{}] {}\n";
|
||||||
static const std::string err = out;
|
static const std::string err = out;
|
||||||
|
|
||||||
// TODO: configurable formats
|
|
||||||
}
|
}
|
||||||
|
namespace logging {
|
||||||
class Formatter {
|
class Formatter {
|
||||||
public:
|
public:
|
||||||
static std::string format(const std::string &format,
|
static std::string format(const std::string &format,
|
||||||
|
Loading…
Reference in New Issue
Block a user