if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
if(HAS_FORTIFY_SOURCE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
- set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
endif()
endif()
CHECK_C_COMPILER_FLAG(-fstack-protector-strong HAS_STACK_PROTECT)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64")
endif(no_yasm)
-# require c++11
+# require c++14
if(CMAKE_VERSION VERSION_LESS "3.1")
include(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
- if(NOT COMPILER_SUPPORTS_CXX11)
+ CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
+ if(NOT COMPILER_SUPPORTS_CXX14)
message(FATAL_ERROR
- "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
+ "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support.")
endif()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG("-std=gnu99" COMPILER_SUPPORTS_GNU99)
if(NOT COMPILER_SUPPORTS_GNU99)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
else()
- set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 99)
auto l = uniquely_lock(m_lock);
uint64_t tid = m_next_tid++;
m_tid_result[tid] = Result(on_finish);
- auto ctx = make_unique<C_OrderedThrottle>(this, tid);
+ auto ctx = std::make_unique<C_OrderedThrottle>(this, tid);
complete_pending_ops(l);
while (m_max == m_current) {