From 04d3dd6df112e8ae8f8b770ae351843ba2c51afd Mon Sep 17 00:00:00 2001 From: XMRig Date: Fri, 6 Oct 2017 19:34:06 +0300 Subject: [PATCH] #130 Fixed compatibility with CMake older than 3.1.0. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1705cc00e..fde1b9415 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,7 @@ endif() add_definitions(/D__STDC_FORMAT_MACROS) add_definitions(/DUNICODE) +add_definitions(/DRAPIDJSON_SSE2) #add_definitions(/DAPP_DEBUG) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") @@ -168,6 +169,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU) add_definitions(/D_GNU_SOURCE) + if (${CMAKE_VERSION} VERSION_LESS "3.1.0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() + #set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -gdwarf-2") elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)