Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,49 @@ jobs:
run: |
echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/.local/lib:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"

- name: Find Package Integration Workflow
uses: alandefreitas/cpp-actions/[email protected]
if: ${{ matrix.build-cmake || matrix.is-earliest }}
with:
source-dir: boost-root/libs/${{ steps.patch.outputs.module }}/test/cmake_test
build-dir: __build_cmake_install_test__
generator: ${{ matrix.generator }}
generator-toolset: ${{ matrix.generator-toolset }}
build-type: ${{ matrix.build-type }}
cxxstd: ${{ matrix.latest-cxxstd }}
cc: ${{ steps.setup-cpp.outputs.cc || matrix.cc }}
ccflags: ${{ matrix.ccflags }}
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
cxxflags: ${{ matrix.cxxflags }}
shared: ${{ matrix.shared }}
install: false
cmake-version: '>=3.15'
extra-args: |
-D BOOST_CI_INSTALL_TEST=ON
-D CMAKE_PREFIX_PATH=${{ steps.patch.outputs.workspace_root }}/.local
ref-source-dir: boost-root/libs/capy
trace-commands: true

- name: Subdirectory Integration Workflow
uses: alandefreitas/cpp-actions/[email protected]
if: ${{ matrix.build-cmake || matrix.is-earliest }}
with:
source-dir: boost-root/libs/${{ steps.patch.outputs.module }}/test/cmake_test
build-dir: __build_cmake_subdir_test__
generator: ${{ matrix.generator }}
generator-toolset: ${{ matrix.generator-toolset }}
build-type: ${{ matrix.build-type }}
cxxstd: ${{ matrix.latest-cxxstd }}
cc: ${{ steps.setup-cpp.outputs.cc || matrix.cc }}
ccflags: ${{ matrix.ccflags }}
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
cxxflags: ${{ matrix.cxxflags }}
shared: ${{ matrix.shared }}
install: false
cmake-version: '>=3.15'
extra-args: -D BOOST_CI_INSTALL_TEST=OFF
ref-source-dir: boost-root/libs/capy/test/cmake_test

- name: Root Project CMake Workflow
uses: alandefreitas/cpp-actions/[email protected]
if: ${{ matrix.build-cmake || matrix.is-earliest }}
Expand Down
49 changes: 49 additions & 0 deletions test/cmake_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# Copyright (c) 2023 Christian Mazakas
# Copyright (c) 2022 alandefreitas ([email protected])
#
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
#

cmake_minimum_required(VERSION 3.5...3.16)

project(cmake_subdir_test LANGUAGES CXX)
set(__ignore__ ${CMAKE_C_COMPILER})
set(__ignore__ ${CMAKE_C_FLAGS})

if(BOOST_CI_INSTALL_TEST)
find_package(Boost CONFIG REQUIRED COMPONENTS capy)
else()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_subdirectory(../.. boostorg/capy)

set(deps
# Primary dependencies

assert
config
core
system
throw_exception

# Secondary dependencies

compat
variant2
winapi
mp11
predef
)

foreach(dep IN LISTS deps)
add_subdirectory(../../../${dep} boostorg/${dep} EXCLUDE_FROM_ALL)
endforeach()
endif()

add_executable(main main.cpp)
target_link_libraries(main Boost::capy)

enable_testing()
add_test(NAME main COMMAND main)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
13 changes: 13 additions & 0 deletions test/cmake_test/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Copyright (c) 2025 Mohammad Nejati
//
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
//

#include <boost/capy.hpp>

int
main()
{
}
Loading