Skip to content

Commit

Permalink
Add CMake target
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Jul 5, 2023
1 parent a1025e9 commit fe64be0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,23 @@ project(
DESCRIPTION "standalone boost::unordered library")

option(BUS_INCLUDE_TESTS "Include tests in the build" ${BUS_MASTER_PROJECT})
option(BUS_SYSTEM_INCLUDE "Mark boost_unordered headers as system includes" OFF)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if(BUS_SYSTEM_INCLUDE)
set(BUS_SYSTEM_TAG "SYSTEM")
endif()

add_library(boost_unordered INTERFACE)
target_include_directories(
boost_unordered
${BUS_SYSTEM_TAG} INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/>
$<INSTALL_INTERFACE:include>)

if(BUS_INCLUDE_TESTS)
include(CTest)
add_subdirectory(test)
Expand Down

0 comments on commit fe64be0

Please # to comment.