Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 83c8ab9

Browse filesBrowse files
committed
CI: adopt boost-cli GHA
1 parent 44475ab commit 83c8ab9
Copy full SHA for 83c8ab9

12 files changed

+863-149Lines changed: 863 additions & 149 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/ci.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+455Lines changed: 455 additions & 0 deletions
Large diffs are not rendered by default.
Collapse file

‎.github/workflows/main.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/main.yml
-113Lines changed: 0 additions & 113 deletions
This file was deleted.
Collapse file

‎CMakeLists.txt‎

Copy file name to clipboard
+46-31Lines changed: 46 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,68 @@
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)
8+
project(boost_openmethod VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
9+
10+
set(BOOST_OPENMETHOD_IS_ROOT OFF)
11+
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
12+
set(BOOST_OPENMETHOD_IS_ROOT ON)
1013
endif()
1114

12-
if(POLICY CMP0167)
13-
cmake_policy(SET CMP0167 NEW)
15+
if(BOOST_OPENMETHOD_IS_ROOT)
16+
include(CTest)
17+
endif()
18+
if(NOT BOOST_SUPERPROJECT_VERSION)
19+
option(BOOST_OPENMETHOD_INSTALL "Install boost::openmethod files" ON)
20+
option(BOOST_OPENMETHOD_BUILD_TESTS "Build boost::openmethod tests" ${BUILD_TESTING})
21+
option(BOOST_OPENMETHOD_BUILD_EXAMPLES "Build boost::openmethod examples" ${BOOST_OPENMETHOD_IS_ROOT})
22+
else()
23+
set(BOOST_OPENMETHOD_BUILD_TESTS ${BUILD_TESTING})
1424
endif()
1525

16-
project(boost_openmethod VERSION 1.87.0 LANGUAGES CXX)
26+
if(BOOST_OPENMETHOD_IS_ROOT)
27+
#
28+
# Building inside Boost tree, but as a separate project e.g. on Travis or
29+
# other CI, or when producing Visual Studio Solution and Projects.
1730

18-
if(NOT CMAKE_CXX_STANDARD)
19-
set(CMAKE_CXX_STANDARD 17)
31+
set(BOOST_INCLUDE_LIBRARIES openmethod)
32+
set(BOOST_EXCLUDE_LIBRARIES openmethod)
33+
list(APPEND BOOST_INCLUDE_LIBRARIES test)
34+
if(BOOST_OPENMETHOD_BUILD_EXAMPLES)
35+
# list(APPEND BOOST_INCLUDE_LIBRARIES optional)
36+
endif()
37+
38+
set(CMAKE_FOLDER _deps)
39+
add_subdirectory(../.. _deps/boost EXCLUDE_FROM_ALL)
40+
unset(CMAKE_FOLDER)
2041
endif()
21-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2242

2343
add_library(boost_openmethod INTERFACE)
2444
add_library(Boost::openmethod ALIAS boost_openmethod)
2545

26-
target_include_directories(boost_openmethod INTERFACE include)
27-
28-
find_package(Boost COMPONENTS)
29-
target_link_libraries(boost_openmethod INTERFACE Boost::boost)
46+
target_compile_features(boost_openmethod INTERFACE cxx_std_17)
3047

31-
if(MSVC)
32-
add_compile_options(/EHsc /FAs /bigobj)
33-
endif()
48+
target_include_directories(boost_openmethod INTERFACE include)
3449

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()
50+
target_link_libraries(
51+
boost_openmethod
52+
INTERFACE
53+
Boost::assert
54+
Boost::config
55+
Boost::core
56+
Boost::dynamic_bitset
57+
Boost::mp11
58+
Boost::preprocessor
59+
)
4260

43-
if(BUILD_TESTING)
44-
message(STATUS "Building tests")
45-
include(CTest)
61+
if(BOOST_OPENMETHOD_BUILD_TESTS)
4662
enable_testing()
4763
add_subdirectory(test)
4864
endif()
4965

50-
if(BUILD_EXAMPLES)
51-
message(STATUS "Building examples")
66+
if(BOOST_OPENMETHOD_BUILD_EXAMPLES)
5267
add_subdirectory(example)
5368
endif()
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
-1Lines changed: 0 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Branch | GH Actions | Azure Pipelines | Coverity Scan | codecov.io | De
1414
[`master`](https://github.com/jll63/openmethod/tree/master) | [![CI](https://github.com/jll63/openmethod/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jll63/openmethod/actions/workflows/ci.yml) | [![Build Status](https://dev.azure.com/maintainer/template/_apis/build/status/pipeline?branchName=master)](https://dev.azure.com/maintainer/template/_build/latest?definitionId=6&branchName=master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/BADLE-NUMBER-LIKE-13982/badge.svg)](https://scan.coverity.com/projects/boostorg-template) | [![codecov](https://codecov.io/gh/jll63/openmethod/branch/master/graph/badge.svg)](https://codecov.io/gh/jll63/openmethod/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/template.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/template/doc/html/template.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/template.html)
1515
[`develop`](https://github.com/jll63/openmethod/tree/develop) | [![CI](https://github.com/jll63/openmethod/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/jll63/openmethod/actions/workflows/ci.yml) | [![Build Status](https://dev.azure.com/maintainer/template/_apis/build/status/pipeline?branchName=develop)](https://dev.azure.com/maintainer/template/_build/latest?definitionId=6&branchName=develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/BADGE-NUMBER-LIKE-13982/badge.svg)](https://scan.coverity.com/projects/boostorg-template) | [![codecov](https://codecov.io/gh/jll63/openmethod/branch/develop/graph/badge.svg)](https://codecov.io/gh/jll63/openmethod/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/template.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/template/doc/html/template.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/template.html)
1616

17-
1817
### Directories
1918

2019
| Name | Purpose |
Collapse file

‎meta/libraries.json‎

Copy file name to clipboard
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"key": "openmethod",
3+
"name": "OpenMethod",
4+
"authors": [
5+
"Jean-Louis Leroy"
6+
],
7+
"maintainers": [
8+
"Jean-Louis Leroy"
9+
],
10+
"description": "Open methods for C++17 and above.",
11+
"category": [
12+
"Programming"
13+
],
14+
"cxxstd": "17"
15+
}
Collapse file

‎test/CMakeLists.txt‎

Copy file name to clipboardExpand all lines: test/CMakeLists.txt
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
# See accompanying file LICENSE_1_0.txt
44
# or copy at http://www.boost.org/LICENSE_1_0.txt)
55

6+
if(NOT TARGET tests)
7+
add_custom_target(tests ${EXCLUDE_TESTS_FROM_ALL})
8+
set_property(TARGET tests PROPERTY FOLDER _deps)
9+
endif()
10+
611
file(GLOB test_cpp_files "test_*.cpp")
12+
713
foreach(test_cpp ${test_cpp_files})
814
cmake_path(REMOVE_EXTENSION test_cpp LAST_ONLY OUTPUT_VARIABLE test)
915
string(REGEX REPLACE ".*/" "" test ${test})
1016
add_executable(${test} ${test_cpp})
11-
target_link_libraries(${test} Boost::openmethod)
17+
target_link_libraries(${test} Boost::openmethod Boost::unit_test_framework)
1218
add_test(NAME ${test} COMMAND ${test})
19+
add_dependencies(tests ${test})
1320
endforeach()
Collapse file

‎test/Jamfile‎

Copy file name to clipboardExpand all lines: test/Jamfile
+12-3Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,21 @@ project
2525
# <toolset>clang:<warnings-as-errors>on
2626
;
2727

28-
# list
28+
alias unit_test_framework
29+
: # sources
30+
/boost/test//boost_unit_test_framework
31+
;
32+
2933
for local src in [ glob test_*.cpp ]
3034
{
31-
run $(src) ;
35+
run $(src) unit_test_framework ;
36+
}
37+
38+
for local src in [ glob compile_fail_*.cpp ]
39+
{
40+
compile-fail $(src) ;
3241
}
3342

3443
# quick (for CI)
35-
alias quick : test_blackbox ;
44+
alias quick : test_dispatch ;
3645
explicit quick ;
Collapse file
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2018, 2019, 2021 Peter Dimov
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
4+
5+
cmake_minimum_required(VERSION 3.5...3.20)
6+
7+
project(cmake_install_test LANGUAGES CXX)
8+
9+
find_package(boost_openmethod REQUIRED)
10+
11+
add_executable(main main.cpp)
12+
target_link_libraries(main Boost::openmethod)
13+
14+
enable_testing()
15+
add_test(main main)
16+
17+
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.