Skip to content
Draft
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
15 changes: 9 additions & 6 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
"tests": [
{ "stdlibs": ["libstdc++"],
"tests": [
"Debug.Default", "Release.Default",
"Release.MaxSan", "Debug.Werror",
"Debug.Dynamic", "Debug.Coverage"
"Debug.Default", "Debug.Coverage",
"Debug.MaxSan", "Debug.Werror",
Comment on lines +43 to +44
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only Debug must be used with sanitizer or coverage!

"Release.Default", "Release.Dynamic"
]
}
]
Expand All @@ -67,8 +67,8 @@ jobs:
"tests": [
{ "stdlibs": ["libc++"],
"tests": [
"Debug.Default", "Release.Default", "Release.MaxSan",
"Debug.Dynamic"
"Debug.Default", "Debug.MaxSan",
"Release.Default", "Release.Dynamic"
]
}
]
Expand Down Expand Up @@ -96,7 +96,10 @@ jobs:
{ "cxxversions": ["c++23"],
"tests": [
{ "stdlibs": ["stl"],
"tests": ["Debug.Default", "Release.Default", "Release.MaxSan"]
"tests": [
"Debug.Default", "Debug.MaxSan",
"Release.Default", "Release.Dynamic"
Copy link
Collaborator Author

@ClausKlein ClausKlein Feb 2, 2026

Choose a reason for hiding this comment

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

For Windows, static and dynamic must be build in Release and tested after install!

]
}
]
}
Expand Down
30 changes: 17 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,32 @@ if(BEMAN_USE_MODULES)

# CMake requires the language standard to be specified as compile feature
# when a target provides C++23 modules and the target will be installed
add_library(beman.execution STATIC)
add_library(beman::execution ALIAS beman.execution)
add_library(${TARGET_PREFIX} STATIC)
add_library(beman::execution ALIAS ${TARGET_PREFIX})
target_compile_features(
beman.execution
${TARGET_PREFIX}
PUBLIC cxx_std_${CMAKE_CXX_STANDARD}
)

include(GenerateExportHeader)

generate_export_header(
beman.execution
BASE_NAME beman.execution
${TARGET_PREFIX}
BASE_NAME ${TARGET_PREFIX}
EXPORT_FILE_NAME beman/execution/modules_export.hpp
)
target_sources(
beman.execution
${TARGET_PREFIX}
PUBLIC
FILE_SET HEADERS
BASE_DIRS include ${CMAKE_CURRENT_BINARY_DIR}
FILES
${CMAKE_CURRENT_BINARY_DIR}/beman/execution/modules_export.hpp
)
# FIXME: target_compile_definitions(beman.execution PUBLIC BEMAN_HAS_MODULES)
target_compile_definitions(${TARGET_PREFIX} PUBLIC BEMAN_HAS_MODULES)
Comment on lines -51 to +50
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

here I have activated the using of the cxx_modules code in tests and examples

endif()

if(BEMAN_USE_MODULES AND CMAKE_CXX_MODULE_STD)
target_compile_definitions(beman.execution PUBLIC BEMAN_HAS_IMPORT_STD)
target_compile_definitions(${TARGET_PREFIX} PUBLIC BEMAN_HAS_IMPORT_STD)
else()
message(WARNING "Missing support for CMAKE_CXX_MODULE_STD!")
endif()
Expand All @@ -72,13 +71,18 @@ option(

add_subdirectory(src/beman/execution)

#===============================================================================
# NOTE: this must be done before tests! CK
include(./cmake/beman-install-library-config.cmake)
beman_install_library(${TARGET_PREFIX} headers)
include(./cmake/beman-install-library.cmake)
beman_install_library(${TARGET_PREFIX} TARGETS ${TARGET_NAME} ${TARGET_PREFIX}
# FIXME: DEPENDENCIES [===[beman.inplace_vector 1.0.0]===] [===[beman.scope 0.0.1 EXACT]===] fmt
# TODO(CK): XXX OR XXX DEPENDENCIES "beman.inplace_vector 1.0.0;beman.scope 0.0.1 EXACT"
)
#===============================================================================

if(BEMAN_EXECUTION_ENABLE_TESTING)
enable_testing()
enable_testing()

if(BEMAN_EXECUTION_ENABLE_TESTING)
add_subdirectory(tests/beman/execution)
endif()

Expand Down
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SANITIZERS := run
# SANITIZERS += asan # TODO: tsan msan
# endif

.PHONY: default release debug doc run update check ce todo distclean clean codespell clang-tidy build test install all format unstage $(SANITIZERS) module build-module test-module
.PHONY: default release debug doc run update check ce todo distclean clean codespell clang-tidy build test install all format unstage $(SANITIZERS) module build-module test-module build-interface

SYSROOT ?=
TOOLCHAIN ?=
Expand Down Expand Up @@ -99,7 +99,7 @@ endif
# TODO: beman.execution.examples.modules
# FIXME: beman.execution.execution-module.test beman.execution.stop-token-module.test

default: release
default: module

all: $(SANITIZERS)

Expand All @@ -116,7 +116,7 @@ doc:
# ==========================================================
# NOTE: cmake configure to only test without modules! CK
# ==========================================================
build:
build build-interface:
cmake -G Ninja -S $(SOURCEDIR) -B $(BUILD) $(TOOLCHAIN) $(SYSROOT) \
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON \
-D CMAKE_SKIP_INSTALL_RULES=ON \
Expand All @@ -126,9 +126,11 @@ build:
-D CMAKE_CXX_SCAN_FOR_MODULES=OFF \
-D BEMAN_USE_MODULES=OFF \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SKIP_TEST_ALL_DEPENDENCY=OFF \
-D CMAKE_CXX_COMPILER=$(CXX) --log-level=VERBOSE
cmake --build $(BUILD)
# XXX --fresh -D CMAKE_CXX_FLAGS="$(CXX_FLAGS) $(SAN_FLAGS)"
# XXX --fresh -D CMAKE_CXX_FLAGS="$(CXX_FLAGS) $(SAN_FLAGS)"
cmake --build $(BUILD) --target all_verify_interface_header_sets
cmake --build $(BUILD) --target all

# NOTE: without install, see CMAKE_SKIP_INSTALL_RULES! CK
test: build
Expand All @@ -137,13 +139,15 @@ test: build
module build-module:
cmake -G Ninja -S $(SOURCEDIR) -B $(BUILD) $(TOOLCHAIN) $(SYSROOT) \
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON \
-D CMAKE_SKIP_INSTALL_RULES=ON \
-D CMAKE_SKIP_INSTALL_RULES=OFF \
-D CMAKE_CXX_STANDARD=23 \
-D CMAKE_CXX_EXTENSIONS=ON \
-D CMAKE_CXX_STANDARD_REQUIRED=ON \
-D CMAKE_CXX_SCAN_FOR_MODULES=ON \
-D BEMAN_USE_MODULES=ON \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_MESSAGE=LAZY \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_COMPILER=$(CXX) --log-level=VERBOSE
cmake --build $(BUILD)

Expand Down
10 changes: 10 additions & 0 deletions cmake/Config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# cmake/Config.cmake.in -*-makefile-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

include(CMakeFindDependencyMacro)

@PACKAGE_INIT@

include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake)

check_required_components(@PROJECT_NAME@)
Loading
Loading