diff --git a/CMakeLists.txt b/CMakeLists.txt index 0df6353..4c7aa2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # cmake-format: on -cmake_minimum_required(VERSION 3.27) +cmake_minimum_required(VERSION 3.27...3.31) project( beman.iterator_interface @@ -23,15 +23,19 @@ beman_iterator_check_deducing_this(COMPILER_SUPPORTS_DEDUCING_THIS) set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets) -option(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS +option( + BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS "Make use of C++23 \"deducing this\" feature (P0847R7). Turn this off for non-conforming compilers." ${COMPILER_SUPPORTS_DEDUCING_THIS}) -option(BEMAN_ITERATOR_INTERFACE_BUILD_TESTS - "Enable building tests and test infrastructure. Default: ON. Values: {ON, OFF}." ${PROJECT_IS_TOP_LEVEL}) +option( + BEMAN_ITERATOR_INTERFACE_BUILD_TESTS + "Enable building tests and test infrastructure. Default: ON. Values: {ON, OFF}." + ${PROJECT_IS_TOP_LEVEL}) option(BEMAN_ITERATOR_INTERFACE_BUILD_EXAMPLES - "Enable building examples. Default: ON. Values: {ON, OFF}." ${PROJECT_IS_TOP_LEVEL}) + "Enable building examples. Default: ON. Values: {ON, OFF}." + ${PROJECT_IS_TOP_LEVEL}) if(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS AND NOT COMPILER_SUPPORTS_DEDUCING_THIS) @@ -67,20 +71,10 @@ target_sources( TYPE HEADERS BASE_DIRS - # XXX src ${PROJECT_BINARY_DIR}/include ${PROJECT_SOURCE_DIR}/include FILES - ${PROJECT_BINARY_DIR}/include/beman/iterator_interface/config.hpp - ) - -# target_include_directories( -# beman.iterator_interface -# PUBLIC -# $ -# $ -# $ -# ) + ${PROJECT_BINARY_DIR}/include/beman/iterator_interface/config.hpp) add_subdirectory(src/beman/iterator_interface) add_subdirectory(include/beman/iterator_interface) @@ -103,6 +97,3 @@ add_custom_target( COMMENT "Running gcovr to process coverage results" COMMAND mkdir -p coverage COMMAND gcovr --config gcovr.cfg .) - -# install(FILES ${PROJECT_BINARY_DIR}/include/beman/iterator_interface/config.hpp -# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/beman/iterator_interface) diff --git a/Makefile b/Makefile old mode 100755 new mode 100644 diff --git a/include/beman/iterator_interface/CMakeLists.txt b/include/beman/iterator_interface/CMakeLists.txt index 281b603..697cd03 100644 --- a/include/beman/iterator_interface/CMakeLists.txt +++ b/include/beman/iterator_interface/CMakeLists.txt @@ -5,16 +5,17 @@ target_sources( beman.iterator_interface - PUBLIC FILE_SET - beman_iterator_interface_headers - TYPE - HEADERS - BASE_DIRS - ${PROJECT_BINARY_DIR}/include - ${PROJECT_SOURCE_DIR}/include - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/iterator_interface.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/iterator_interface_access.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/detail/stl_interfaces/config.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/detail/stl_interfaces/fwd.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/detail/stl_interfaces/iterator_interface.hpp) + PUBLIC + FILE_SET + beman_iterator_interface_headers + TYPE + HEADERS + BASE_DIRS + ${PROJECT_BINARY_DIR}/include + ${PROJECT_SOURCE_DIR}/include + FILES + iterator_interface.hpp + iterator_interface_access.hpp + detail/stl_interfaces/config.hpp + detail/stl_interfaces/fwd.hpp + detail/stl_interfaces/iterator_interface.hpp) diff --git a/tests/beman/iterator_interface/CMakeLists.txt b/tests/beman/iterator_interface/CMakeLists.txt index 3cd3b47..75b566d 100644 --- a/tests/beman/iterator_interface/CMakeLists.txt +++ b/tests/beman/iterator_interface/CMakeLists.txt @@ -15,10 +15,11 @@ target_sources( PRIVATE FILE_SET beman_iterator_interface_tests_headers TYPE HEADERS) target_link_libraries( - beman.iterator_interface.tests PRIVATE beman::iterator_interface # XXX GTest::gtest + beman.iterator_interface.tests PRIVATE beman::iterator_interface GTest::gtest GTest::gtest_main) -# [Issue #18](https://github.com/bemanproject/iterator_interface/issues/18): Re-enable ASAN run CI/clang-19. +# [Issue #18](https://github.com/bemanproject/iterator_interface/issues/18): +# Re-enable ASAN run CI/clang-19. # # Note: clang-19 + gtest_discover_tests + Asan setup causes errors on some # platforms. Temporary switch to gtest_add_tests and skip some Asan checks.