Skip to content

Commit 847a71b

Browse files
committed
Add atomic component of boost as library dependency
1 parent dccbc4b commit 847a71b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ include(${CMAKE_MODULE_PATH}/DownloadProject/DownloadProject.cmake)
1111

1212
#Boost
1313
set(BOOST_REQUESTED_VERSION 1.58.0)
14-
find_package(Boost)
15-
if(Boost_FOUND)
16-
include_directories(${Boost_INCLUDE_DIRS})
17-
else()
18-
message(FATAL_ERROR "Your need the Boost header files for lockfree data structures")
14+
find_package(Boost COMPONENTS atomic)
15+
if(NOT Boost_FOUND)
16+
message(FATAL_ERROR "You need the Boost header files for lockfree data structures")
1917
endif()
18+
#
19+
include_directories(${Boost_INCLUDE_DIRS})
2020

2121
#Common flags and variables
2222
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
@@ -36,7 +36,7 @@ file(GLOB_RECURSE INCLUDES
3636

3737
#Static library packaging
3838
add_library(colouring ${SRCS} ${INCLUDES})
39-
set(CORE_LIBS colouring)
39+
set(CORE_LIBS colouring ${Boost_LIBRARIES})
4040

4141
#nested build scripts
4242
add_subdirectory(tests)

0 commit comments

Comments
 (0)