Skip to content

Commit 032da82

Browse files
committed
generate CMakeLists.txt
1 parent 0f67d13 commit 032da82

1 file changed

Lines changed: 19 additions & 36 deletions

File tree

CMakeLists.txt

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
# Copyright (c) 2018-2025 Jean-Louis Leroy
1+
# Generated by `boostdep --cmake openmethod`
2+
# Copyright 2020, 2021 Peter Dimov
23
# Distributed under the Boost Software License, Version 1.0.
3-
# See accompanying file LICENSE_1_0.txt
4-
# or copy at http://www.boost.org/LICENSE_1_0.txt)
4+
# https://www.boost.org/LICENSE_1_0.txt
55

6-
cmake_minimum_required(VERSION 3.10)
6+
cmake_minimum_required(VERSION 3.5...3.20)
77

8-
if(POLICY CMP0167)
9-
cmake_policy(SET CMP0074 NEW)
10-
endif()
11-
12-
if(POLICY CMP0167)
13-
cmake_policy(SET CMP0167 NEW)
14-
endif()
15-
16-
project(boost_openmethod VERSION 1.87.0 LANGUAGES CXX)
8+
project(boost_openmethod VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
179

1810
if(NOT CMAKE_CXX_STANDARD)
1911
set(CMAKE_CXX_STANDARD 17)
@@ -25,29 +17,20 @@ add_library(Boost::openmethod ALIAS boost_openmethod)
2517

2618
target_include_directories(boost_openmethod INTERFACE include)
2719

28-
find_package(Boost COMPONENTS)
29-
target_link_libraries(boost_openmethod INTERFACE Boost::boost)
30-
31-
if(MSVC)
32-
add_compile_options(/EHsc /FAs /bigobj)
33-
endif()
34-
35-
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
36-
message(STATUS "Enabling sanitizers")
37-
add_compile_options(
38-
-fPIC -Wno-deprecated-declarations -Wall -Wextra -Werror
39-
-fsanitize=undefined -fsanitize=address -fsanitize=leak)
40-
add_link_options(-fsanitize=undefined -fsanitize=address -fsanitize=leak)
41-
endif()
42-
43-
if(BUILD_TESTING)
44-
message(STATUS "Building tests")
45-
include(CTest)
46-
enable_testing()
20+
target_link_libraries(boost_openmethod
21+
INTERFACE
22+
Boost::assert
23+
Boost::config
24+
Boost::core
25+
Boost::dynamic_bitset
26+
Boost::mp11
27+
Boost::preprocessor
28+
)
29+
30+
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
4731
add_subdirectory(test)
4832
endif()
4933

50-
if(BUILD_EXAMPLES)
51-
message(STATUS "Building examples")
52-
add_subdirectory(example)
53-
endif()
34+
# if(BUILD_EXAMPLES)
35+
# add_subdirectory(example)
36+
# endif()

0 commit comments

Comments
 (0)