erlcass
erlcass copied to clipboard
Fails to compile with cmake v4
cppdriver uses old cmake min version which cmake 4.x doesn't like.
Patching cppdriver like so resolves:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c615094..a5d193a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5.0)
project(cassandra C CXX)
set(CASS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/cmake/ClangFormat.cmake b/cmake/ClangFormat.cmake
index de9d501..a86baf5 100644
--- a/cmake/ClangFormat.cmake
+++ b/cmake/ClangFormat.cmake
@@ -1,7 +1,7 @@
#
# Format and verify formatting using clang-format
#
-cmake_minimum_required(VERSION 2.6.4)
+cmake_minimum_required(VERSION 3.5.0)
include(FindPackageHandleStandardArgs)
diff --git a/src/third_party/sparsehash/CMakeLists.txt b/src/third_party/sparsehash/CMakeLists.txt
index 426c297..8734662 100644
--- a/src/third_party/sparsehash/CMakeLists.txt
+++ b/src/third_party/sparsehash/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.6.4)
+cmake_minimum_required(VERSION 3.5.0)
include(CheckCXXSourceCompiles)
include(CheckFunctionExists)
Perhaps a conditional patching of the driver could be done based on installed cmake version. Upstream cppdriver seems quite idle.
Feel free to send a pull request. or you can also submit an issue in the datastax issue tracker for the cppdriver. But I'm opened also to a patch