mirror of
https://github.com/boostorg/pfr.git
synced 2026-01-19 04:22:13 +00:00
Another fix attempt for the CMake build from the root directory of Boost (#209)
Fixes https://github.com/boostorg/pfr/issues/206
This commit is contained in:
@@ -10,7 +10,7 @@ file(GLOB CORE_RUN_FILES "core/run/*.cpp")
|
||||
foreach (testsourcefile ${CORE_RUN_FILES})
|
||||
get_filename_component(testname ${testsourcefile} NAME_WLE)
|
||||
add_executable(pfr_core_${testname} ${testsourcefile})
|
||||
target_link_libraries(pfr_core_${testname} Boost::pfr)
|
||||
target_link_libraries(pfr_core_${testname} Boost::pfr Boost::core)
|
||||
target_include_directories(pfr_core_${testname} PRIVATE ../../../)
|
||||
add_test(NAME pfr_core_${testname} COMMAND pfr_core_${testname})
|
||||
add_dependencies(tests pfr_core_${testname})
|
||||
@@ -21,7 +21,7 @@ foreach (testsourcefile ${CORE_NAME_RUN_FILES})
|
||||
get_filename_component(testname ${testsourcefile} NAME_WLE)
|
||||
add_executable(pfr_corename_${testname} ${testsourcefile})
|
||||
target_compile_features(pfr_corename_${testname} PUBLIC cxx_std_20)
|
||||
target_link_libraries(pfr_corename_${testname} Boost::pfr)
|
||||
target_link_libraries(pfr_corename_${testname} Boost::pfr Boost::core)
|
||||
target_include_directories(pfr_corename_${testname} PRIVATE ../../../)
|
||||
add_test(NAME pfr_corename_${testname} COMMAND pfr_corename_${testname})
|
||||
add_dependencies(tests pfr_corename_${testname})
|
||||
|
||||
15
test/cmake_subdir_test/CMakeLists.txt
Normal file
15
test/cmake_subdir_test/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2016-2025 Antony Polukhin
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...4.0)
|
||||
|
||||
project(pfr_subdir_test LANGUAGES CXX)
|
||||
|
||||
add_subdirectory(../../../assert boostorg/assert)
|
||||
add_subdirectory(../../../core boostorg/core)
|
||||
add_subdirectory(../../../config boostorg/config)
|
||||
add_subdirectory(../../../static_assert boostorg/static_assert)
|
||||
add_subdirectory(../../../throw_exception boostorg/throw_exception)
|
||||
|
||||
add_subdirectory(../../ boostorg/pfr)
|
||||
Reference in New Issue
Block a user