From 6703661b17c42cd253a610d29c68f973b2ba9603 Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 21:09:58 +0200 Subject: [PATCH 01/16] Apply the Beman Standard: CMAKE.PROJECT_NAME --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93a3491..5cca464 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.10) -project(beman_iter_interface VERSION 0.0.0 LANGUAGES CXX) +project(beman_iterator_interface VERSION 0.0.0 LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") include(FetchContent) From bb4cc529539b1d91652d8388739b34ebabd38624 Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 22:51:08 +0200 Subject: [PATCH 02/16] Update CITTATTION --- CITATION.cff | 2 +- CMakeLists.txt | 3 +++ .../iterator_interface.test.cpp | 0 3 files changed, 4 insertions(+), 1 deletion(-) rename src/beman/iterator_interface/iterator_interface.t.cpp => tests/iterator_interface.test.cpp (100%) diff --git a/CITATION.cff b/CITATION.cff index b33ad02..53bbef1 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,4 +1,4 @@ cff-version: 1.0.0 message: "If you use this software, please cite it as below." -title: "Beman.iterator" +title: "beman.iterator_interface" url: "https://github.com/beman-project/iterator_interface" diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cca464..1bac071 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,10 @@ cmake_minimum_required(VERSION 3.10) project(beman_iterator_interface VERSION 0.0.0 LANGUAGES CXX) +# Local helpers: required to include CompilerFeatureTest. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") + +# Includes include(FetchContent) include(CompilerFeatureTest) diff --git a/src/beman/iterator_interface/iterator_interface.t.cpp b/tests/iterator_interface.test.cpp similarity index 100% rename from src/beman/iterator_interface/iterator_interface.t.cpp rename to tests/iterator_interface.test.cpp From ac0aa2cc9b0a1b1632f23d2941e713b21ced32f4 Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 22:51:19 +0200 Subject: [PATCH 03/16] Update gitmodules --- .gitmodules | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index b44d8c0..8b13789 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1 @@ -[submodule "papers/wg21"] - path = papers/P2988/wg21 - url = https://github.com/mpark/wg21.git + From 27666ebb73c27e29570fecb4f62741452d2e514a Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 22:51:34 +0200 Subject: [PATCH 04/16] Remove extern --- extern/CMakeLists.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 extern/CMakeLists.txt diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt deleted file mode 100644 index 04fddb0..0000000 --- a/extern/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -if(BEMAN_ITERATOR_INTERFACE_ENABLE_TESTING) - # Fetch GoogleTest - FetchContent_Declare( - googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG - f8d7d77c06936315286eb55f8de22cd23c188571 # release-1.14.0 - EXCLUDE_FROM_ALL - ) - block() - set(INSTALL_GTEST OFF) # Disable GoogleTest installation - set(BUILD_TESTING OFF) # Disable GoogleTest tests - FetchContent_MakeAvailable(googletest) - endblock() -endif() From 4b87aac3a1abbce1464afb6197fef812223667dd Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 22:51:49 +0200 Subject: [PATCH 05/16] Add coverage file --- cmake/gcovr.cfg.in | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 cmake/gcovr.cfg.in diff --git a/cmake/gcovr.cfg.in b/cmake/gcovr.cfg.in new file mode 100644 index 0000000..9112efb --- /dev/null +++ b/cmake/gcovr.cfg.in @@ -0,0 +1,11 @@ +root = @CMAKE_SOURCE_DIR@ +cobertura = @CMAKE_BINARY_DIR@/coverage/cobertura.xml +sonarqube = @CMAKE_BINARY_DIR@/coverage/sonarqube.xml +html-details = @CMAKE_BINARY_DIR@/coverage/coverage.html +gcov-executable = @GCOV_EXECUTABLE@ +gcov-parallel = yes +html-theme = github.dark-blue +html-self-contained = yes +print-summary = yes +filter = .*/beman/iterator_interface/.* +exclude = .*\.t\.cpp From 4888aa17554d5f795e8edf97b2111547a9447844 Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 22:54:28 +0200 Subject: [PATCH 06/16] Apply more Beman Standard tweaks for cmake files --- CMakeLists.txt | 102 ++++++++++-------- examples/CMakeLists.txt | 32 +++--- .../beman/iterator_interface/CMakeLists.txt | 17 +++ src/beman/iterator_interface/CMakeLists.txt | 62 +++-------- tests/CMakeLists.txt | 27 +++++ 5 files changed, 127 insertions(+), 113 deletions(-) create mode 100644 include/beman/iterator_interface/CMakeLists.txt create mode 100644 tests/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bac071..c02cb0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,72 +1,86 @@ +# cmake-format: off # CMakeLists.txt -*-CMake-*- -# # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.27) -project(beman_iterator_interface VERSION 0.0.0 LANGUAGES CXX) +project( + beman_iterator_interface + VERSION 0.0.0 + LANGUAGES CXX) # Local helpers: required to include CompilerFeatureTest. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") # Includes +include(CTest) include(FetchContent) include(CompilerFeatureTest) +# Prechecks. beman_iterator_check_deducing_this(COMPILER_SUPPORTS_DEDUCING_THIS) +set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets) + option(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS - "Make use of deducing this. Turn this off for non-conforming compilers." - ${COMPILER_SUPPORTS_DEDUCING_THIS}) + "Make use of deducing this. Turn this off for non-conforming compilers." + ${COMPILER_SUPPORTS_DEDUCING_THIS}) -option(BEMAN_ITERATOR_INTERFACE_ENABLE_TESTING "Build beman.iterator_interface tests" ${PROJECT_IS_TOP_LEVEL}) +option(ITERATOR_INTERFACE_ENABLE_TESTING + "Enable building tests and test infrastructure" ${PROJECT_IS_TOP_LEVEL}) -if(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS AND NOT COMPILER_SUPPORTS_DEDUCING_THIS) - message(WARNING "Building with deducing this support despite of the compiler's lack of support for it") +if(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS + AND NOT COMPILER_SUPPORTS_DEDUCING_THIS) + message( + WARNING + "Building with deducing this support despite of the compiler's lack of support for it" + ) endif() configure_file( "${PROJECT_SOURCE_DIR}/include/beman/iterator_interface/config.hpp.in" - "${PROJECT_BINARY_DIR}/include/beman/iterator_interface/config.hpp" - @ONLY -) - -if(BEMAN_ITERATOR_INTERFACE_ENABLE_TESTING) - enable_testing() + "${PROJECT_BINARY_DIR}/include/beman/iterator_interface/config.hpp" @ONLY) + +# Build the tests if enabled via the option ITERATOR_INTERFACE_ENABLE_TESTING +if(ITERATOR_INTERFACE_ENABLE_TESTING) + # Fetch GoogleTest + FetchContent_Declare( + googletest + EXCLUDE_FROM_ALL + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG e39786088138f2749d64e9e90e0f9902daa77c40 # release-1.15.0 + ) + FetchContent_MakeAvailable(googletest) endif() -set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets) +# Create the library target and named header set for beman_iterator_interface +add_library(beman_iterator_interface STATIC) +target_sources( + beman_iterator_interface + PUBLIC FILE_SET + beman_iterator_interface_headers + TYPE + HEADERS + BASE_DIRS + src + include + "${PROJECT_BINARY_DIR}/include/") -add_subdirectory(extern) add_subdirectory(src/beman/iterator_interface) -add_subdirectory(examples) - -include(GNUInstallDirs) +add_subdirectory(include/beman/iterator_interface) -set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake) +add_subdirectory(examples) +if(ITERATOR_INTERFACE_ENABLE_TESTING) + add_subdirectory(tests) +endif() -install( - EXPORT ${TARGETS_EXPORT_NAME} - NAMESPACE ${CMAKE_PROJECT_NAME} - DESTINATION ${INSTALL_CONFIGDIR} - ) +# Coverage +configure_file("cmake/gcovr.cfg.in" gcovr.cfg @ONLY) -include(CMakePackageConfigHelpers) - -write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake - VERSION ${PROJECT_VERSION} - COMPATIBILITY AnyNewerVersion -) - -configure_package_config_file( - "cmake/Config.cmake.in" - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake - INSTALL_DESTINATION ${INSTALL_CONFIGDIR} -) - -install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake - DESTINATION ${INSTALL_CONFIGDIR} -) +add_custom_target( + process_coverage + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Running gcovr to process coverage results" + COMMAND mkdir -p coverage + COMMAND gcovr --config gcovr.cfg .) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 0cb5c05..78b019a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,32 +1,24 @@ -# examples/CMakeLists.txt -*-CMake-*- -# +# cmake-format: off +# examples/CMakeLists.txt -*-makefile-*- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -include(GNUInstallDirs) +# cmake-format: on # List of all buildable examples. -set(EXAMPLES - sample -) +set(EXAMPLES sample) -foreach(EXAMPLE ${EXAMPLES}) +foreach(example ${EXAMPLES}) # Add example executable. - add_executable(${EXAMPLE} "") + add_executable(${example} "") # Add example source file. - target_sources( - ${EXAMPLE} - PRIVATE - ${EXAMPLE}.cpp - ) + target_sources(${example} PRIVATE ${example}.cpp) # Link example with the library. - target_link_libraries(${EXAMPLE} beman.iterator_interface) + target_link_libraries(${example} beman_iterator_interface) - # Install . + # Install. install( - TARGETS ${EXAMPLE} - EXPORT ${TARGETS_EXPORT_NAME} - DESTINATION ${CMAKE_INSTALL_BINDIR} - ) + TARGETS ${example} + COMPONENT beman_iterator_interface_examples + DESTINATION ${CMAKE_INSTALL_BINDIR}) endforeach() diff --git a/include/beman/iterator_interface/CMakeLists.txt b/include/beman/iterator_interface/CMakeLists.txt new file mode 100644 index 0000000..2240c8f --- /dev/null +++ b/include/beman/iterator_interface/CMakeLists.txt @@ -0,0 +1,17 @@ +# cmake-format: off +# include/beman/iterator_interface/CMakeLists.txt -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + +target_sources( + beman_iterator_interface + PUBLIC FILE_SET + beman_iterator_interface_headers + TYPE + HEADERS + 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/src/beman/iterator_interface/CMakeLists.txt b/src/beman/iterator_interface/CMakeLists.txt index bcea9a3..05c5a51 100644 --- a/src/beman/iterator_interface/CMakeLists.txt +++ b/src/beman/iterator_interface/CMakeLists.txt @@ -1,55 +1,19 @@ -# src/beman/iterator_interface/CMakeLists.txt -*-CMake-*- -# +# cmake-format: off +# src/beman/iterator_interface/CMakeLists.txt -*-cmake-*- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on -add_library(beman.iterator_interface) -add_library(beman::iterator_interface ALIAS beman.iterator_interface) - -target_sources( - beman.iterator_interface - PRIVATE - iterator_interface.cpp -) - -include(GNUInstallDirs) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -target_include_directories(beman.iterator_interface PUBLIC - $ - $ - $ # /include/scratch -) +# Ensure that iterator_interface gets compiled at least once. +target_sources(beman_iterator_interface PUBLIC iterator_interface.cpp) +# The library is empty -- exclude it install( - TARGETS beman.iterator_interface - EXPORT ${TARGETS_EXPORT_NAME}1 - DESTINATION ${CMAKE_INSTALL_LIBDIR} -) - -string(TOLOWER ${CMAKE_PROJECT_NAME} CMAKE_LOWER_PROJECT_NAME) + TARGETS beman_iterator_interface + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT beman_iterator_interface_library + EXCLUDE_FROM_ALL) install( - DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_LOWER_PROJECT_NAME} - FILES_MATCHING PATTERN "*.hpp" -) - -target_link_libraries(beman.iterator_interface) - -## Tests -if(BEMAN_ITERATOR_INTERFACE_ENABLE_TESTING) - add_executable(iterator_interface_test "") - - target_sources( - iterator_interface_test - PRIVATE - iterator_interface.t.cpp - ) - - target_link_libraries(iterator_interface_test beman.iterator_interface) - target_link_libraries(iterator_interface_test GTest::gtest) - target_link_libraries(iterator_interface_test GTest::gtest_main) - - include(GoogleTest) - gtest_discover_tests(iterator_interface_test) -endif() + TARGETS beman_iterator_interface FILE_SET beman_iterator_interface_headers + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT beman_iterator_interface_development) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..d211f76 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,27 @@ +# cmake-format: off +# src/beman/iterator_interface/tests/CMakeLists.txt -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + +include(GoogleTest) + +# Tests +add_executable(beman_iterator_interface_test) + +target_sources(beman_iterator_interface_test + PRIVATE iterator_interface.test.cpp) + +target_sources( + beman_iterator_interface_test + PRIVATE FILE_SET beman_iterator_interface_test_headers TYPE HEADERS) + +target_link_libraries( + beman_iterator_interface_test PRIVATE beman_iterator_interface GTest::gtest + GTest::gtest_main) + +# Issue #32: 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. +# Change also applied for CI flows. +gtest_add_tests(TARGET beman_iterator_interface_test "" AUTO) From ac51d3c1e103dfef29da3f702b5347eceb7d48dc Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 23:17:53 +0200 Subject: [PATCH 07/16] Import .cmake-format.json from optional26 --- .cmake-format.json | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .cmake-format.json diff --git a/.cmake-format.json b/.cmake-format.json new file mode 100644 index 0000000..f5120cc --- /dev/null +++ b/.cmake-format.json @@ -0,0 +1,85 @@ +{ + "parse": { + "additional_commands": { + "foo": { + "flags": [ + "BAR", + "BAZ" + ], + "kwargs": { + "HEADERS": "*", + "SOURCES": "*", + "DEPENDS": "*" + } + } + }, + "override_spec": {}, + "vartags": [], + "proptags": [] + }, + "format": { + "disable": false, + "line_width": 80, + "tab_size": 2, + "use_tabchars": false, + "fractional_tab_policy": "use-space", + "max_subgroups_hwrap": 2, + "max_pargs_hwrap": 6, + "max_rows_cmdline": 2, + "separate_ctrl_name_with_space": false, + "separate_fn_name_with_space": false, + "dangle_parens": false, + "dangle_align": "prefix", + "min_prefix_chars": 4, + "max_prefix_chars": 10, + "max_lines_hwrap": 2, + "line_ending": "unix", + "command_case": "canonical", + "keyword_case": "unchanged", + "always_wrap": [], + "enable_sort": true, + "autosort": false, + "require_valid_layout": false, + "layout_passes": {} + }, + "markup": { + "bullet_char": "*", + "enum_char": ".", + "first_comment_is_literal": false, + "literal_comment_pattern": null, + "fence_pattern": "^\\s*([`~]{3}[`~]*)(.*)$", + "ruler_pattern": "^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$", + "explicit_trailing_pattern": "#<", + "hashruler_min_length": 10, + "canonicalize_hashrulers": true, + "enable_markup": true + }, + "lint": { + "disabled_codes": [], + "function_pattern": "[0-9a-z_]+", + "macro_pattern": "[0-9A-Z_]+", + "global_var_pattern": "[A-Z][0-9A-Z_]+", + "internal_var_pattern": "_[A-Z][0-9A-Z_]+", + "local_var_pattern": "[a-z][a-z0-9_]+", + "private_var_pattern": "_[0-9a-z_]+", + "public_var_pattern": "[A-Z][0-9A-Z_]+", + "argument_var_pattern": "[a-z][a-z0-9_]+", + "keyword_pattern": "[A-Z][0-9A-Z_]+", + "max_conditionals_custom_parser": 2, + "min_statement_spacing": 1, + "max_statement_spacing": 2, + "max_returns": 6, + "max_branches": 12, + "max_arguments": 5, + "max_localvars": 15, + "max_statements": 50 + }, + "encode": { + "emit_byteorder_mark": false, + "input_encoding": "utf-8", + "output_encoding": "utf-8" + }, + "misc": { + "per_command": {} + } +} From b290d9d3401ad6912311ed28a9788c6fc4b20ef0 Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 23:26:01 +0200 Subject: [PATCH 08/16] Apply the Beman Standard: CMAKE.LIBRARY_ALIAS --- CMakeLists.txt | 2 ++ examples/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c02cb0d..79beb33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,8 @@ endif() # Create the library target and named header set for beman_iterator_interface add_library(beman_iterator_interface STATIC) +add_library(beman::iterator_interface ALIAS beman_iterator_interface) + target_sources( beman_iterator_interface PUBLIC FILE_SET diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 78b019a..e43c8c4 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -14,7 +14,7 @@ foreach(example ${EXAMPLES}) target_sources(${example} PRIVATE ${example}.cpp) # Link example with the library. - target_link_libraries(${example} beman_iterator_interface) + target_link_libraries(${example} beman::iterator_interface) # Install. install( diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d211f76..784c0a3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -16,7 +16,7 @@ target_sources( PRIVATE FILE_SET beman_iterator_interface_test_headers TYPE HEADERS) target_link_libraries( - beman_iterator_interface_test PRIVATE beman_iterator_interface GTest::gtest + beman_iterator_interface_test PRIVATE beman::iterator_interface GTest::gtest GTest::gtest_main) # Issue #32: Re-enable ASAN run CI/clang-19. From fb6f50cedffd902fc7e43a96344eeca1bca8eb29 Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 23:30:58 +0200 Subject: [PATCH 09/16] Apply the Beman Standard: CMAKE.LIBRARY_NAME --- CMakeLists.txt | 10 +++++----- include/beman/iterator_interface/CMakeLists.txt | 2 +- src/beman/iterator_interface/CMakeLists.txt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 79beb33..a14bc80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.27) project( - beman_iterator_interface + beman.iterator_interface VERSION 0.0.0 LANGUAGES CXX) @@ -54,12 +54,12 @@ if(ITERATOR_INTERFACE_ENABLE_TESTING) FetchContent_MakeAvailable(googletest) endif() -# Create the library target and named header set for beman_iterator_interface -add_library(beman_iterator_interface STATIC) -add_library(beman::iterator_interface ALIAS beman_iterator_interface) +# Create the library target and named header set for beman.iterator_interface +add_library(beman.iterator_interface STATIC) +add_library(beman::iterator_interface ALIAS beman.iterator_interface) target_sources( - beman_iterator_interface + beman.iterator_interface PUBLIC FILE_SET beman_iterator_interface_headers TYPE diff --git a/include/beman/iterator_interface/CMakeLists.txt b/include/beman/iterator_interface/CMakeLists.txt index 2240c8f..749ac46 100644 --- a/include/beman/iterator_interface/CMakeLists.txt +++ b/include/beman/iterator_interface/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake-format: on target_sources( - beman_iterator_interface + beman.iterator_interface PUBLIC FILE_SET beman_iterator_interface_headers TYPE diff --git a/src/beman/iterator_interface/CMakeLists.txt b/src/beman/iterator_interface/CMakeLists.txt index 05c5a51..057242f 100644 --- a/src/beman/iterator_interface/CMakeLists.txt +++ b/src/beman/iterator_interface/CMakeLists.txt @@ -4,16 +4,16 @@ # cmake-format: on # Ensure that iterator_interface gets compiled at least once. -target_sources(beman_iterator_interface PUBLIC iterator_interface.cpp) +target_sources(beman.iterator_interface PUBLIC iterator_interface.cpp) # The library is empty -- exclude it install( - TARGETS beman_iterator_interface + TARGETS beman.iterator_interface ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT beman_iterator_interface_library EXCLUDE_FROM_ALL) install( - TARGETS beman_iterator_interface FILE_SET beman_iterator_interface_headers + TARGETS beman.iterator_interface FILE_SET beman_iterator_interface_headers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT beman_iterator_interface_development) From 6c3c2aea7aa3042f958b91a60ec2e372f07a6a36 Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 10 Nov 2024 23:36:22 +0200 Subject: [PATCH 10/16] Apply the Beman Standard: CMAKE.TARGET_NAMES --- examples/CMakeLists.txt | 12 +++++++----- src/beman/iterator_interface/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 17 ++++++++--------- tests/iterator_interface.test.cpp | 2 +- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index e43c8c4..b7b51bb 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -8,17 +8,19 @@ set(EXAMPLES sample) foreach(example ${EXAMPLES}) # Add example executable. - add_executable(${example} "") + add_executable(beman.iterator_interface.examples.${example} "") # Add example source file. - target_sources(${example} PRIVATE ${example}.cpp) + target_sources(beman.iterator_interface.examples.${example} + PRIVATE ${example}.cpp) # Link example with the library. - target_link_libraries(${example} beman::iterator_interface) + target_link_libraries(beman.iterator_interface.examples.${example} + beman::iterator_interface) # Install. install( - TARGETS ${example} - COMPONENT beman_iterator_interface_examples + TARGETS beman.iterator_interface.examples.${example} + COMPONENT beman.iterator_interface.examples DESTINATION ${CMAKE_INSTALL_BINDIR}) endforeach() diff --git a/src/beman/iterator_interface/CMakeLists.txt b/src/beman/iterator_interface/CMakeLists.txt index 057242f..53ab904 100644 --- a/src/beman/iterator_interface/CMakeLists.txt +++ b/src/beman/iterator_interface/CMakeLists.txt @@ -10,7 +10,7 @@ target_sources(beman.iterator_interface PUBLIC iterator_interface.cpp) install( TARGETS beman.iterator_interface ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT beman_iterator_interface_library + COMPONENT beman.iterator_interface.library EXCLUDE_FROM_ALL) install( diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 784c0a3..8816453 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,27 +1,26 @@ # cmake-format: off -# src/beman/iterator_interface/tests/CMakeLists.txt -*-makefile-*- +# tests/CMakeLists.txt -*-makefile-*- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # cmake-format: on include(GoogleTest) -# Tests -add_executable(beman_iterator_interface_test) +add_executable(beman.iterator_interface.tests) -target_sources(beman_iterator_interface_test +target_sources(beman.iterator_interface.tests PRIVATE iterator_interface.test.cpp) target_sources( - beman_iterator_interface_test - PRIVATE FILE_SET beman_iterator_interface_test_headers TYPE HEADERS) + beman.iterator_interface.tests + PRIVATE FILE_SET beman_iterator_interface_tests_headers TYPE HEADERS) target_link_libraries( - beman_iterator_interface_test PRIVATE beman::iterator_interface GTest::gtest - GTest::gtest_main) + beman.iterator_interface.tests PRIVATE beman::iterator_interface GTest::gtest + GTest::gtest_main) # Issue #32: 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. # Change also applied for CI flows. -gtest_add_tests(TARGET beman_iterator_interface_test "" AUTO) +gtest_add_tests(TARGET beman.iterator_interface.tests "" AUTO) diff --git a/tests/iterator_interface.test.cpp b/tests/iterator_interface.test.cpp index cc30017..5697ac3 100644 --- a/tests/iterator_interface.test.cpp +++ b/tests/iterator_interface.test.cpp @@ -1,4 +1,4 @@ -// src/beman/iterator_interface/iterator_interface.y.cpp -*-C++-*- +// tests/iterator_interfaces.test.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include From f68ba965c2916ae32919b3b47cb473571607a479 Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Mon, 11 Nov 2024 00:01:44 +0200 Subject: [PATCH 11/16] Add missing target_include_directories --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a14bc80..c1af923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,8 +66,15 @@ target_sources( HEADERS BASE_DIRS src - include - "${PROJECT_BINARY_DIR}/include/") + include) + +target_include_directories( + beman.iterator_interface + PUBLIC + $ + $ + $ +) add_subdirectory(src/beman/iterator_interface) add_subdirectory(include/beman/iterator_interface) From 8e403b4844c77b139c626157d6a84e100be1810d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Mon, 11 Nov 2024 00:13:53 +0200 Subject: [PATCH 12/16] Set proper issue number for ASAN problem on clang-19 Co-authored-by: Radu Nichita <45298861+RaduNichita@users.noreply.github.com> --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8816453..842ca11 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -18,7 +18,7 @@ target_link_libraries( beman.iterator_interface.tests PRIVATE beman::iterator_interface GTest::gtest GTest::gtest_main) -# Issue #32: Re-enable ASAN run CI/clang-19. +# Issue #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. From bb46b49bc6d93453cdc6a2a278e8f4f268bb1ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Mon, 11 Nov 2024 00:29:04 +0200 Subject: [PATCH 13/16] Update C++23 "deducing this" config docs --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1af923..0670a02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ beman_iterator_check_deducing_this(COMPILER_SUPPORTS_DEDUCING_THIS) set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets) option(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS - "Make use of deducing this. Turn this off for non-conforming compilers." + "Make use of C++23 "deducing this" feature (P0847R7). Turn this off for non-conforming compilers." ${COMPILER_SUPPORTS_DEDUCING_THIS}) option(ITERATOR_INTERFACE_ENABLE_TESTING From 102db97cc72bdc5d32312e8f3360dfa2408b62aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Mon, 11 Nov 2024 00:29:35 +0200 Subject: [PATCH 14/16] Update C++23 "deducing this" missing support warning --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0670a02..d4d63b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ if(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS AND NOT COMPILER_SUPPORTS_DEDUCING_THIS) message( WARNING - "Building with deducing this support despite of the compiler's lack of support for it" + "Building with C++23 "deducing this" feature (P0847R7) despite of the compiler's lack of actual support for it." ) endif() From add4a25ca8d4588a03d02722c8ffc120cbc3c7bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Mon, 11 Nov 2024 00:30:47 +0200 Subject: [PATCH 15/16] Update linked issues in CMakeLists.txt for tests --- CMakeLists.txt | 4 ++-- tests/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4d63b4..0b5a3f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ beman_iterator_check_deducing_this(COMPILER_SUPPORTS_DEDUCING_THIS) set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets) option(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS - "Make use of C++23 "deducing this" feature (P0847R7). Turn this off for non-conforming compilers." + "Make use of C++23 \"deducing this\" feature (P0847R7). Turn this off for non-conforming compilers." ${COMPILER_SUPPORTS_DEDUCING_THIS}) option(ITERATOR_INTERFACE_ENABLE_TESTING @@ -34,7 +34,7 @@ if(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS AND NOT COMPILER_SUPPORTS_DEDUCING_THIS) message( WARNING - "Building with C++23 "deducing this" feature (P0847R7) despite of the compiler's lack of actual support for it." + "Building with C++23 \"deducing this\" feature (P0847R7) despite of the compiler's lack of actual support for it." ) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 842ca11..119f96a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -18,7 +18,7 @@ target_link_libraries( beman.iterator_interface.tests PRIVATE beman::iterator_interface GTest::gtest GTest::gtest_main) -# Issue #18: Re-enable ASAN run CI/clang-19. +# [Issue #18](https://github.com/beman-project/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. From faae4f8d3242508ff26be3cc7a12cb0264b1418a Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Mon, 11 Nov 2024 11:28:47 +0200 Subject: [PATCH 16/16] Apply the Beman Standard: FILE.LICENSE_ID --- .github/CODEOWNERS | 4 +- .github/workflows/ci.yml | 3 + README.md | 4 +- cmake/CompilerFeatureTest.cmake | 5 ++ cmake/Config.cmake.in | 5 ++ etc/ci-clang-toolchain.cmake | 5 ++ etc/clang-16-toolchain.cmake | 5 ++ etc/clang-17-toolchain.cmake | 5 ++ etc/clang-18-toolchain.cmake | 5 ++ etc/clang-19-toolchain.cmake | 5 ++ etc/clang-flags.cmake | 5 ++ etc/gcc-11-toolchain.cmake | 5 ++ etc/gcc-12-toolchain.cmake | 5 ++ etc/gcc-13-toolchain.cmake | 5 ++ etc/gcc-14-toolchain.cmake | 5 ++ etc/gcc-flags.cmake | 5 ++ etc/gcc-toolchain.cmake | 5 ++ etc/llvm-16-toolchain.cmake | 5 ++ etc/llvm-master-toolchain.cmake | 5 ++ etc/llvm-toolchain.cmake | 5 ++ etc/toolchain.cmake | 5 ++ examples/CMakeLists.txt | 2 +- examples/README.md | 10 +-- papers/.clang-format | 119 -------------------------------- tests/CMakeLists.txt | 2 +- 25 files changed, 106 insertions(+), 128 deletions(-) delete mode 100644 papers/.clang-format diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 14ca6b3..17d8d5e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,5 @@ -# Codeowners for reviews on PRs +# .github/CODEOWNERS +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# Codeowners for reviews on PRs * @camio @neatudarius @steve-downey diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed07c52..261e63f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,6 @@ +# .github/workflows/ci.yml -*-yaml-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: CI Tests on: workflow_dispatch: diff --git a/README.md b/README.md index 4a2fcaf..89a77fb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# beman.iterator\_interface: iterator creation mechanisms - +# beman.iterator\_interface: iterator creation mechanisms + **Implements**: * [`std::iterator_interface` (P2727)](https://wg21.link/P2727) diff --git a/cmake/CompilerFeatureTest.cmake b/cmake/CompilerFeatureTest.cmake index 68d7a00..df9b294 100644 --- a/cmake/CompilerFeatureTest.cmake +++ b/cmake/CompilerFeatureTest.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# cmake/CompilerFeatureTest.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + # Functions that determine compiler capabilities include(CheckCXXSourceCompiles) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index 38bbde7..783e878 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -1,3 +1,8 @@ +# cmake-format: off +# cmake/Config.cmake.in -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + @PACKAGE_INIT@ include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") diff --git a/etc/ci-clang-toolchain.cmake b/etc/ci-clang-toolchain.cmake index 75531ee..6a6669b 100755 --- a/etc/ci-clang-toolchain.cmake +++ b/etc/ci-clang-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/ci-clang-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_C_COMPILER clang) diff --git a/etc/clang-16-toolchain.cmake b/etc/clang-16-toolchain.cmake index 7f26880..9fe8f80 100755 --- a/etc/clang-16-toolchain.cmake +++ b/etc/clang-16-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/clang-16-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_C_COMPILER clang-16) diff --git a/etc/clang-17-toolchain.cmake b/etc/clang-17-toolchain.cmake index 5e266b6..528ed9e 100755 --- a/etc/clang-17-toolchain.cmake +++ b/etc/clang-17-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/clang-17-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_C_COMPILER clang-17) diff --git a/etc/clang-18-toolchain.cmake b/etc/clang-18-toolchain.cmake index 7aabede..d49019d 100755 --- a/etc/clang-18-toolchain.cmake +++ b/etc/clang-18-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/clang-18-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_C_COMPILER clang-18) diff --git a/etc/clang-19-toolchain.cmake b/etc/clang-19-toolchain.cmake index 48f6e07..64a26e0 100755 --- a/etc/clang-19-toolchain.cmake +++ b/etc/clang-19-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/clang-19-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_C_COMPILER clang-19) diff --git a/etc/clang-flags.cmake b/etc/clang-flags.cmake index fdb64dc..ac796a7 100644 --- a/etc/clang-flags.cmake +++ b/etc/clang-flags.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/clang-flags.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_CXX_STANDARD 23) diff --git a/etc/gcc-11-toolchain.cmake b/etc/gcc-11-toolchain.cmake index d45db1e..c34c816 100755 --- a/etc/gcc-11-toolchain.cmake +++ b/etc/gcc-11-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/gcc-11-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake") diff --git a/etc/gcc-12-toolchain.cmake b/etc/gcc-12-toolchain.cmake index 5e33221..e36eca7 100755 --- a/etc/gcc-12-toolchain.cmake +++ b/etc/gcc-12-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/gcc-12-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake") diff --git a/etc/gcc-13-toolchain.cmake b/etc/gcc-13-toolchain.cmake index 4d17470..54ecd60 100755 --- a/etc/gcc-13-toolchain.cmake +++ b/etc/gcc-13-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/gcc-13-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake") diff --git a/etc/gcc-14-toolchain.cmake b/etc/gcc-14-toolchain.cmake index f969286..f665810 100755 --- a/etc/gcc-14-toolchain.cmake +++ b/etc/gcc-14-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/gcc-14-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake") diff --git a/etc/gcc-flags.cmake b/etc/gcc-flags.cmake index 3ada976..1d7bad5 100644 --- a/etc/gcc-flags.cmake +++ b/etc/gcc-flags.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/gcc-flags.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_CXX_STANDARD 23) diff --git a/etc/gcc-toolchain.cmake b/etc/gcc-toolchain.cmake index ab7ec45..19f0850 100755 --- a/etc/gcc-toolchain.cmake +++ b/etc/gcc-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/gcc-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_C_COMPILER gcc) diff --git a/etc/llvm-16-toolchain.cmake b/etc/llvm-16-toolchain.cmake index ce7beeb..1651049 100755 --- a/etc/llvm-16-toolchain.cmake +++ b/etc/llvm-16-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/llvm-16-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_C_COMPILER clang-16) diff --git a/etc/llvm-master-toolchain.cmake b/etc/llvm-master-toolchain.cmake index cc09e50..b7a521c 100644 --- a/etc/llvm-master-toolchain.cmake +++ b/etc/llvm-master-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/llvm-master-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + set(LLVM_ROOT "$ENV{LLVM_ROOT}" CACHE PATH "Path to LLVM installation") set(CMAKE_C_COMPILER ${LLVM_ROOT}/bin/clang) diff --git a/etc/llvm-toolchain.cmake b/etc/llvm-toolchain.cmake index 5bd9225..743d509 100755 --- a/etc/llvm-toolchain.cmake +++ b/etc/llvm-toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/llvm-toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) set(CMAKE_C_COMPILER clang-14) diff --git a/etc/toolchain.cmake b/etc/toolchain.cmake index 046d332..b0a47c2 100644 --- a/etc/toolchain.cmake +++ b/etc/toolchain.cmake @@ -1,3 +1,8 @@ +# cmake-format: off +# etc/toolchain.cmake -*-cmake-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# cmake-format: on + include_guard(GLOBAL) include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake") diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index b7b51bb..560a407 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,5 @@ # cmake-format: off -# examples/CMakeLists.txt -*-makefile-*- +# examples/CMakeLists.txt -*-cmake-*- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # cmake-format: on diff --git a/examples/README.md b/examples/README.md index d1de55e..dde22f4 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,14 +1,16 @@ -# Beman.iterator Examples - -List of usage examples for `Beman.iterator`. +# beman.iterator_interfaces: Examples + +List of usage examples for `beman.iterator_interfaces`. ## Sample -Check [sample](sample.cpp) for basic `Beman.iterator` library usage. +TODO: update examples. + +Check [sample](sample.cpp) for basic `beman.iterator_interfaces` library usage. Build and run instructions: ```shell diff --git a/papers/.clang-format b/papers/.clang-format deleted file mode 100644 index 5020462..0000000 --- a/papers/.clang-format +++ /dev/null @@ -1,119 +0,0 @@ -AccessModifierOffset: -2 -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: true -AlignConsecutiveDeclarations: true -AlignEscapedNewlines: Left -AlignOperands: true -AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: Yes -BinPackArguments: false -BinPackParameters: false -BraceWrapping: - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - AfterExternBlock: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false - SplitEmptyFunction: true - SplitEmptyRecord: true - SplitEmptyNamespace: true -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Custom -BreakBeforeInheritanceComma: false -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false -BreakConstructorInitializers: BeforeColon -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: true -ColumnLimit: 79 -CommentPragmas: '^ IWYU pragma:' -CompactNamespaces: false -ConstructorInitializerAllOnOneLineOrOnePerLine: true -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: false -DisableFormat: false -ExperimentalAutoDetectBinPacking: false -FixNamespaceComments: true -ForEachMacros: - - foreach - - Q_FOREACH - - BOOST_FOREACH -IncludeBlocks: Preserve -IncludeCategories: - - Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Priority: 2 - - Regex: '^(<|"(gtest|isl|json)/)' - Priority: 3 - - Regex: '.*' - Priority: 1 -IncludeIsMainRegex: '$' -IndentCaseLabels: false -IndentPPDirectives: None -IndentWidth: 4 -IndentWrappedFunctionNames: false -JavaScriptQuotes: Leave -JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: true -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBinPackProtocolList: Auto -ObjCBlockIndentWidth: 4 -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: true -PenaltyBreakAssignment: 2 -PenaltyBreakBeforeFirstCallParameter: 19 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyBreakTemplateDeclaration: 10 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Left -ReflowComments: true -SortIncludes: false -SortUsingDeclarations: true -SpaceAfterCStyleCast: false -SpaceAfterTemplateKeyword: true -SpaceBeforeAssignmentOperators: true -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeParens: ControlStatements -SpaceBeforeRangeBasedForLoopColon: true -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Auto -TabWidth: 8 -UseTab: Never - ---- -Language: Cpp - ---- -Language: ObjC - -... diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 119f96a..4feb4e7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,5 @@ # cmake-format: off -# tests/CMakeLists.txt -*-makefile-*- +# tests/CMakeLists.txt -*-cmake-*- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # cmake-format: on