From dfc0a357d379f1c497d8a5e9cc9401f48999bc6a Mon Sep 17 00:00:00 2001 From: crypto-ape <43807588+crypto-ape@users.noreply.github.com> Date: Mon, 20 May 2019 15:01:00 +0200 Subject: [PATCH] Updated Boost Lockfree compilation test --- CMakeModules/CheckLibcxxAtomic.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeModules/CheckLibcxxAtomic.cmake b/CMakeModules/CheckLibcxxAtomic.cmake index 0e55627..7239d6f 100644 --- a/CMakeModules/CheckLibcxxAtomic.cmake +++ b/CMakeModules/CheckLibcxxAtomic.cmake @@ -18,11 +18,15 @@ function(check_cxx_atomics varname) if (CMAKE_C_FLAGS MATCHES -fsanitize-coverage OR CMAKE_CXX_FLAGS MATCHES -fsanitize-coverage) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize-coverage=edge,trace-cmp,indirect-calls,8bit-counters") endif() + + set(OLD_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES}) + set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIRS}) + check_cxx_source_compiles(" #include #include -boost::lockfree::queue q; +boost::lockfree::queue> q; int main(int, char**) { uint32_t* a; uint32_t* b; @@ -31,6 +35,7 @@ int main(int, char**) { } " ${varname}) set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) + set(CMAKE_REQUIRED_INCLUDES ${OLD_CMAKE_REQUIRED_INCLUDES}) endfunction(check_cxx_atomics) # Perform the check for 64bit atomics without libatomic.