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
22 changes: 10 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,26 @@ option(
${PROJECT_IS_TOP_LEVEL}
)


add_library(beman.take_before INTERFACE)
target_sources(
beman.take_before
INTERFACE
FILE_SET HEADERS
BASE_DIRS include
FILES include/beman/take_before/take_before.hpp
)
beman.take_before
INTERFACE
FILE_SET HEADERS
BASE_DIRS include
FILES include/beman/take_before/take_before.hpp
)

add_library(beman::take_before ALIAS beman.take_before)
set_target_properties(beman.take_before PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON)

set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/infra/cmake)

# gersemi: on

find_package(beman-install-library REQUIRED)
include(infra/cmake/beman-install-library-config.cmake)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right -- I think this is a better way to do this than the find package obviousl

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: CMAKE_PREFIX_PATH is a list and should appended, not set.

beman_install_library(beman.take_before)

if(BEMAN_TAKE_BEFORE_BUILD_TESTS)
enable_testing()
add_subdirectory(tests/beman/take_before)
enable_testing()
add_subdirectory(tests/beman/take_before)
endif()

if(BEMAN_TAKE_BEFORE_BUILD_EXAMPLES)
Expand Down
6 changes: 5 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@
{
"name": "_root-build",
"hidden": true,
"jobs": 0
"jobs": 0,
"targets": [
"all",
"all_verify_interface_header_sets"
]
},
{
"name": "gcc-debug",
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# beman::take_before
# `beman::take_before`

<!--
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Expand Down Expand Up @@ -105,7 +105,7 @@ Full runnable examples can be found in [`examples/`](examples/).
This project requires:

* A C++ compiler that supports **C++20** or greater
* CMake 3.25 or later
* CMake 3.28 or later
* (Test Only) GoogleTest

You can disable building tests by setting CMake option `BEMAN_TAKE_BEFORE_BUILD_TESTS` to `OFF`.
Expand Down Expand Up @@ -207,5 +207,5 @@ When the delimiter type satisfies `tidy_obj` and the underlying range is borrowe

## References

- [P3220R2: views::take_before](https://wg21.link/P3220R2)
- [P3220R2: views::take before](https://wg21.link/P3220R2)
- [P2760: Tier 1 Ranges Adaptors](https://wg21.link/P2760)