From cd597515e197600b94dc257f01fef74fc5239a50 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 25 Apr 2018 15:27:50 +0800 Subject: [PATCH] wip Signed-off-by: Kefu Chai --- CMakeLists.txt | 1 + port/port_posix.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c55e091d..64ff89fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,6 +170,7 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format") endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + message(STATUS "=========${CMAKE_CXX_FLAGS}======") if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fno-omit-frame-pointer") include(CheckCXXCompilerFlag) diff --git a/port/port_posix.cc b/port/port_posix.cc index 6e9ea645..3162d5b3 100644 --- a/port/port_posix.cc +++ b/port/port_posix.cc @@ -189,6 +189,7 @@ void *cacheline_aligned_alloc(size_t size) { #if __GNUC__ < 5 && defined(__SANITIZE_ADDRESS__) return malloc(size); #elif __cplusplus >= 201703 + #error aligned_alloc return ::operator new(size, std::align_val_t(CACHE_LINE_SIZE)); #elif defined(_ISOC11_SOURCE) return aligned_alloc(CACHE_LINE_SIZE, size); -- 2.47.3