Skip to content

Commit

Permalink
cmake: remove fileset workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
timblechmann committed Dec 19, 2023
1 parent fdbccb9 commit ff236a9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ cmake_minimum_required(VERSION 3.5...3.16)
project(boost_lockfree VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)

option(BOOST_LOCKFREE_BUILD_TESTS "Build boost::lockfree tests" OFF)
option(BOOST_LOCKFREE_USE_FILE_SET "Use FILE_SET for boost::lockfree" OFF)


add_library(boost_lockfree INTERFACE)
add_library(Boost::lockfree ALIAS boost_lockfree)

target_include_directories(boost_lockfree INTERFACE include)

if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.23 AND BOOST_LOCKFREE_USE_FILE_SET)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.23)
set(Headers
include/boost/lockfree/spsc_queue.hpp
include/boost/lockfree/policies.hpp
Expand All @@ -33,7 +29,9 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.23 AND BOOST_LOCKFREE_USE_FILE_SET)
include/boost/lockfree/stack.hpp
)

target_sources(boost_lockfree PUBLIC FILE_SET HEADERS FILES ${Headers} )
target_sources(boost_lockfree PUBLIC FILE_SET HEADERS BASE_DIRS include FILES ${Headers} )
else()
target_include_directories(boost_lockfree INTERFACE include)
endif()

target_link_libraries(boost_lockfree
Expand Down

0 comments on commit ff236a9

Please sign in to comment.