diff --git a/CMakeLists.txt b/CMakeLists.txt index 3281751bd..b6902a3a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.5) project(cassandra C CXX) set(CASS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) @@ -162,6 +162,7 @@ endif() #------------------------ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # Enable C++11 support to use std::atomic if(CASS_USE_STD_ATOMIC) @@ -177,7 +178,8 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR endif() endif() - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") # Clang/Intel specific compiler options # I disabled long-long warning because boost generates about 50 such warnings set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-long-long -Wno-unused-parameter") diff --git a/cmake/ClangFormat.cmake b/cmake/ClangFormat.cmake index 5e36e313a..549af0acd 100644 --- a/cmake/ClangFormat.cmake +++ b/cmake/ClangFormat.cmake @@ -1,7 +1,7 @@ # # Format and verify formatting using clang-format # -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.5) include(FindPackageHandleStandardArgs) diff --git a/src/third_party/sparsehash/CMakeLists.txt b/src/third_party/sparsehash/CMakeLists.txt index 6e1adef74..e1204c80e 100644 --- a/src/third_party/sparsehash/CMakeLists.txt +++ b/src/third_party/sparsehash/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.5) include(CheckCXXSourceCompiles) include(CheckFunctionExists)