-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
45 lines (31 loc) · 1.2 KB
/
CMakeLists.txt
File metadata and controls
45 lines (31 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Generated by `boostdep --cmake sort`
# Copyright 2020, 2021 Peter Dimov
# Copyright 2025 Nigel Stewart
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.10...3.31)
project(boost_sort VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_sort INTERFACE)
add_library(Boost::sort ALIAS boost_sort)
target_include_directories(boost_sort INTERFACE include)
target_link_libraries(boost_sort
INTERFACE
Boost::config
Boost::core
Boost::range
Boost::type_traits
)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
message(STATUS "Using CMake version ${CMAKE_VERSION}")
set(Boost_DEBUG ON)
find_package(Boost 1.85 CONFIG REQUIRED COMPONENTS core range included_test_exec_monitor)
include(CTest)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
add_dependencies(check tests)
endif()
# Testing
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
# Follow the Boost convention: don't build test targets by default,
# and only when explicitly requested by building target tests
add_subdirectory(test EXCLUDE_FROM_ALL)
endif()