Skip to content

Commit a8fc6b2

Browse files
committed
enable C++11, include type_traits
1 parent 2af1597 commit a8fc6b2

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-atomic.patch

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
diff --git a/src/atomic/atomic_std.hpp b/src/atomic/atomic_std.hpp
2-
index 2ad0103..f977bf9 100644
2+
index 2ad0103..08418a9 100644
33
--- a/src/atomic/atomic_std.hpp
44
+++ b/src/atomic/atomic_std.hpp
5-
@@ -22,12 +22,12 @@
5+
@@ -18,16 +18,17 @@
6+
#define DATASTAX_INTERNAL_ATOMIC_STD_HPP
7+
8+
#include <atomic>
9+
+#include <type_traits>
10+
611
namespace datastax { namespace internal {
7-
12+
813
enum MemoryOrder {
914
- MEMORY_ORDER_RELAXED = std::memory_order_relaxed,
1015
- MEMORY_ORDER_CONSUME = std::memory_order_consume,
@@ -19,5 +24,5 @@ index 2ad0103..f977bf9 100644
1924
+ MEMORY_ORDER_ACQ_REL = static_cast<std::underlying_type<std::memory_order>::type>(std::memory_order_acq_rel),
2025
+ MEMORY_ORDER_SEQ_CST = static_cast<std::underlying_type<std::memory_order>::type>(std::memory_order_seq_cst)
2126
};
22-
27+
2328
template <class T>

recipes/cassandra-cpp-driver/all/patches/2.15.3/fix-cmake.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index c615094..b10d9c9 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -164,7 +164,7 @@ endif()
6+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
7+
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
8+
# Enable C++11 support to use std::atomic
9+
- if(CASS_USE_STD_ATOMIC)
10+
+ if(1)
11+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
12+
endif()
13+
114
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
215
index 9052472..3f65adb 100644
316
--- a/cmake/Dependencies.cmake

recipes/cassandra-cpp-driver/all/patches/2.16.2/fix-cmake.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index c615094..b10d9c9 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -164,7 +164,7 @@ endif()
6+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
7+
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
8+
# Enable C++11 support to use std::atomic
9+
- if(CASS_USE_STD_ATOMIC)
10+
+ if(1)
11+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
12+
endif()
13+
114
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
215
index 9052472..4701133 100644
316
--- a/cmake/Dependencies.cmake

0 commit comments

Comments
 (0)