-
Notifications
You must be signed in to change notification settings - Fork 13
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
base: main
Are you sure you want to change the base?
Conversation
This commit makes the following changes to align with Beman project standards: 1. Top-level files - Renamed LICENSE.txt to LICENSE - Updated README.md to use standard badge format 2. CMake structure - Updated CMake project name to beman.execution - Updated option names to follow BEMAN_execution_* format - Updated target names to match Beman conventions - Made targets passive by checking for features at config time 3. Feature test handling - Added config.hpp.in template for feature-dependent code - Added proper CMake checks for compiler features - Generated config.hpp at build time These changes ensure full compliance with all requirements specified in the Beman standard documentation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
CMakeLists.txt
Outdated
# Setup C++ feature tests | ||
include(CheckCXXSourceCompiles) | ||
|
||
# Check for __cpp_explicit_this_parameter | ||
check_cxx_source_compiles(" | ||
struct S { | ||
void f(this S& self) {} | ||
}; | ||
int main() { S s; s.f(); } | ||
" BEMAN_EXECUTION_HAS_EXPLICIT_THIS_PARAMETER) | ||
|
||
# Check for __cpp_lib_unreachable | ||
check_cxx_source_compiles(" | ||
#include <utility> | ||
int main() { std::unreachable(); } | ||
" BEMAN_EXECUTION_HAS_LIB_UNREACHABLE) | ||
|
||
# Check for __cpp_lib_forward_like | ||
check_cxx_source_compiles(" | ||
#include <utility> | ||
int main() { | ||
int x = 42; | ||
auto&& r = std::forward_like<int&>(x); | ||
return 0; | ||
} | ||
" BEMAN_EXECUTION_HAS_LIB_FORWARD_LIKE) | ||
|
||
# Configure the config.hpp file | ||
configure_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include/beman/execution/detail/config/config.hpp.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/include/beman/execution/detail/config/config.hpp" | ||
@ONLY | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bretbrownjr doesn't like this whole section. Remove everything except the first line (the beman.execution
change is good.
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) |
There was a problem hiding this comment.
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
NOTICE
Outdated
beman.execution | ||
Copyright (c) 2025 The Beman Authors | ||
|
||
This product includes software developed by The Beman Authors | ||
(https://github.com/bemanproject/beman). | ||
|
||
This product is governed by the Apache License 2.0 WITH LLVM-exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this whole file
@@ -0,0 +1,16 @@ | |||
// include/beman/execution/detail/config/config.hpp -*-C++-*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like config.hpp files. Remove this and everything related to it
src/beman/execution/CMakeLists.txt
Outdated
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() | ||
|
||
# Add the binary directory to include paths so config.hpp can be found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed
src/beman/execution/CMakeLists.txt
Outdated
# Check for C++26 support at configuration time instead of using target_compile_features | ||
include(CheckCXXCompilerFlag) | ||
check_cxx_compiler_flag("-std=c++26" COMPILER_SUPPORTS_CXX26) | ||
check_cxx_compiler_flag("-std=c++23" COMPILER_SUPPORTS_CXX23) | ||
|
||
if(COMPILER_SUPPORTS_CXX26) | ||
message(STATUS "Using C++26 for ${TARGET_NAME}") | ||
elseif(COMPILER_SUPPORTS_CXX23) | ||
message(STATUS "Using C++23 for ${TARGET_NAME}") | ||
else() | ||
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} does not support C++23 or later. Please use a different compiler.") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this (but deleting what was there was a good change; we just didn't need to add anything)
src/beman/execution/CMakeLists.txt
Outdated
|
||
# Install the generated config.hpp file | ||
install( | ||
FILES ${PROJECT_BINARY_DIR}/include/beman/execution/detail/config/config.hpp | ||
DESTINATION include/beman/execution/detail/config | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this
This commit addresses review feedback from PR 133: - Removed NOTICE file as requested - Removed all config.hpp.in related code - Removed feature detection code - Left only the essential changes for Beman compliance: - Project name change to beman.execution - Option name changes to follow BEMAN_execution_* format - Removal of target_compile_features with PUBLIC visibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
@@ -125,4 +124,4 @@ install( | |||
) | |||
|
|||
set(CPACK_GENERATOR TGZ) | |||
include(CPack) | |||
include(CPack) |
There was a problem hiding this comment.
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 🐶
include(CPack) | |
include(CPack) |
# cmake-format: on | ||
|
||
install( | ||
EXPORT ${TARGETS_EXPORT_NAME}1 | ||
FILE ${TARGETS_EXPORT_NAME}.cmake | ||
DESTINATION "${INSTALL_CONFIGDIR}" | ||
NAMESPACE ${TARGET_NAMESPACE}:: | ||
) | ||
) |
There was a problem hiding this comment.
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 🐶
) | |
) |
Summary
Changes
Top-level file structure
CMake configuration
Feature test handling
Test plan
🤖 Generated with Claude Code