-
Notifications
You must be signed in to change notification settings - Fork 14
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
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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) | ||||||
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 | ||||||
|
@@ -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() | ||||||
|
||||||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶
Suggested change
|
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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() | ||||||
|
@@ -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() | ||||||
|
||||||
|
@@ -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}:: | ||||||
) | ||||||
) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶
Suggested change
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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