@@ -52,6 +52,9 @@ find_package(DoubleConversion MODULE REQUIRED)
52
52
list (APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY} )
53
53
list (APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR} )
54
54
55
+ find_package (FastFloat MODULE REQUIRED)
56
+ list (APPEND FOLLY_INCLUDE_DIRECTORIES ${FASTFLOAT_INCLUDE_DIR} )
57
+
55
58
find_package (Gflags MODULE)
56
59
set (FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND} )
57
60
if (LIBGFLAGS_FOUND)
@@ -184,21 +187,30 @@ message(STATUS "Setting FOLLY_HAVE_DWARF: ${FOLLY_HAVE_DWARF}")
184
187
check_cxx_source_compiles("
185
188
#include <atomic>
186
189
int main(int argc, char** argv) {
190
+ std::atomic<uint8_t> a1;
191
+ std::atomic<uint16_t> a2;
192
+ std::atomic<uint32_t> a4;
193
+ std::atomic<uint64_t> a8;
187
194
struct Test { bool val; };
188
195
std::atomic<Test> s;
189
- return static_cast<int> (s.is_lock_free());
196
+ return a1++ + a2++ + a4++ + a8++ + unsigned (s.is_lock_free());
190
197
}"
191
198
FOLLY_CPP_ATOMIC_BUILTIN
192
199
)
193
200
if (NOT FOLLY_CPP_ATOMIC_BUILTIN)
194
201
list (APPEND CMAKE_REQUIRED_LIBRARIES atomic)
195
202
list (APPEND FOLLY_LINK_LIBRARIES atomic)
203
+ set (ATOMIC_LIBRARY "atomic" )
196
204
check_cxx_source_compiles("
197
205
#include <atomic>
198
206
int main(int argc, char** argv) {
207
+ std::atomic<uint8_t> a1;
208
+ std::atomic<uint16_t> a2;
209
+ std::atomic<uint32_t> a4;
210
+ std::atomic<uint64_t> a8;
199
211
struct Test { bool val; };
200
- std::atomic<Test> s2 ;
201
- return static_cast<int>(s2 .is_lock_free());
212
+ std::atomic<Test> s ;
213
+ return a1++ + a2++ + a4++ + a8++ + unsigned(s .is_lock_free());
202
214
}"
203
215
FOLLY_CPP_ATOMIC_WITH_LIBATOMIC
204
216
)
0 commit comments