Skip to content

Update repository to conform to Beman project standards #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
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
33 changes: 16 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,41 @@

cmake_minimum_required(VERSION 3.25...3.31)

project(beman_execution VERSION 0.0.1 LANGUAGES CXX)
project(beman.execution VERSION 0.0.1 LANGUAGES CXX)

if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-source builds are not allowed!")
endif()

set(TARGET_NAME execution)
set(TARGET_NAME beman.execution)
set(TARGET_NAMESPACE beman)
set(TARGET_PREFIX ${TARGET_NAMESPACE}.${TARGET_NAME})
set(TARGET_LIBRARY ${PROJECT_NAME})
set(TARGET_ALIAS ${TARGET_NAMESPACE}::${TARGET_NAME})
set(TARGET_PACKAGE_NAME ${PROJECT_NAME}-config)
set(TARGETS_EXPORT_NAME ${PROJECT_NAME}-targets)
set(TARGET_SHORT_NAME execution)
set(TARGET_ALIAS ${TARGET_NAMESPACE}::${TARGET_SHORT_NAME})
set(TARGET_PACKAGE_NAME ${TARGET_NAME}Config)
Copy link
Author

Choose a reason for hiding this comment

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

I like the -config version better -@bretbrownjr

set(TARGETS_EXPORT_NAME ${TARGET_NAME}-targets)

option(
BEMAN_EXECUTION_ENABLE_TESTING
"Enable building tests and test infrastructure. Values: { ON, OFF }."
BEMAN_execution_BUILD_TESTS
"Enable building tests and test infrastructure. Default: ON. Values: { ON, OFF }."
${PROJECT_IS_TOP_LEVEL}
)

option(
BEMAN_EXECUTION_BUILD_EXAMPLES
"Enable building examples. Values: { ON, OFF }."
BEMAN_execution_BUILD_EXAMPLES
"Enable building examples. Default: ON. Values: { ON, OFF }."
${PROJECT_IS_TOP_LEVEL}
)

option(
BEMAN_EXECUTION_ENABLE_INSTALL
BEMAN_execution_ENABLE_INSTALL
"Install the project components. Values: { ON, OFF }."
${PROJECT_IS_TOP_LEVEL}
)

include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})

if(NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
if(NOT BEMAN_execution_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
include(FetchContent)

# Add project_options from https://github.com/aminya/project_options
Expand Down Expand Up @@ -91,17 +90,17 @@ endif()

add_subdirectory(src/beman/execution)

if(BEMAN_EXECUTION_ENABLE_TESTING)
if(BEMAN_execution_BUILD_TESTS)
enable_testing()

add_subdirectory(tests/beman/execution)
endif()

if(BEMAN_EXECUTION_BUILD_EXAMPLES)
if(BEMAN_execution_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

if(NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
if(NOT BEMAN_execution_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
return()
endif()

Expand All @@ -125,4 +124,4 @@ install(
)

set(CPACK_GENERATOR TGZ)
include(CPack)
include(CPack)
Copy link

Choose a reason for hiding this comment

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

[pre-commit] reported by reviewdog 🐶

Suggested change
include(CPack)
include(CPack)

File renamed without changes.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->
# beman.execution: Building Block For Asynchronous Programs

<img src="https://github.com/bemanproject/beman/blob/main/images/logos/beman_logo-beman_library_under_development.png" style="width:5%; height:auto;">
![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg) ![Linux build status](https://github.com/bemanproject/execution/actions/workflows/linux.yml/badge.svg) ![MacOS build status](https://github.com/bemanproject/execution/actions/workflows/macos.yml/badge.svg) ![Window build status](https://github.com/bemanproject/execution/actions/workflows/windows.yml/badge.svg)

`beman.execution` provides the basic vocabulary for asynchronous
programming as well as important algorithms implemented in terms
Expand Down Expand Up @@ -48,10 +48,6 @@ contains some links for general information about the sender/receivers and `std:

## Build

| Library | Linux | MacOS | Windows |
| ------- | ----- | ----- | ------- |
| build | ![Linux build status](https://github.com/bemanproject/execution/actions/workflows/linux.yml/badge.svg) | ![MacOS build status](https://github.com/bemanproject/execution/actions/workflows/macos.yml/badge.svg) | ![Window build status](https://github.com/bemanproject/execution/actions/workflows/windows.yml/badge.svg) |

The following instructions build the library and the examples:

cmake --workflow --list-presets
Expand Down
12 changes: 4 additions & 8 deletions src/beman/execution/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
add_library(${TARGET_NAME} STATIC)
add_library(${TARGET_ALIAS} ALIAS ${TARGET_NAME})

if(NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
if(NOT BEMAN_execution_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
target_link_libraries(${TARGET_NAME} PUBLIC $<BUILD_INTERFACE:${TARGET_NAME}_project_options>)
target_link_libraries(${TARGET_NAME} PUBLIC $<BUILD_INTERFACE:${TARGET_NAME}_project_warnings>)
endif()
Expand Down Expand Up @@ -193,12 +193,7 @@ source_group("Header Files\\detail" FILES ${DETAIL_HEADER_FILES})

set_target_properties(${TARGET_NAME} PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON)

target_compile_features(${TARGET_NAME} PUBLIC
"$<$<COMPILE_FEATURES:cxx_std_26>:cxx_std_26>"
"$<$<NOT:$<COMPILE_FEATURES:cxx_std_26>>:cxx_std_23>"
)

if(NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
if(NOT BEMAN_execution_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
return()
endif()

Expand All @@ -209,11 +204,12 @@ install(
FILE_SET ${TARGET_NAME}_public_headers
FILE_SET ${TARGET_NAME}_detail_headers
)

# cmake-format: on

install(
EXPORT ${TARGETS_EXPORT_NAME}1
FILE ${TARGETS_EXPORT_NAME}.cmake
DESTINATION "${INSTALL_CONFIGDIR}"
NAMESPACE ${TARGET_NAMESPACE}::
)
)
Copy link

Choose a reason for hiding this comment

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

[pre-commit] reported by reviewdog 🐶

Suggested change
)
)

Loading