Skip to content

Comments

Feature/prepare cxx modules support#60

Merged
dietmarkuehl merged 7 commits intomainfrom
feature/prepare-cxx_modules-support
Feb 20, 2026
Merged

Feature/prepare cxx modules support#60
dietmarkuehl merged 7 commits intomainfrom
feature/prepare-cxx_modules-support

Conversation

@ClausKlein
Copy link
Contributor

@ClausKlein ClausKlein commented Feb 19, 2026

Use beman-install-library.cmake

@coveralls
Copy link

coveralls commented Feb 19, 2026

Coverage Status

coverage: 92.691% (-0.9%) from 93.548%
when pulling da2738f on feature/prepare-cxx_modules-support
into 008ab08 on main.

@ClausKlein ClausKlein marked this pull request as ready for review February 19, 2026 17:23
Copy link
Member

@dietmarkuehl dietmarkuehl left a comment

Choose a reason for hiding this comment

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

The first two comments are really questsions which may need to be addressed. I think we need to find an agreeable compromise for the Makefile. Maybe my suggestion works?

Comment on lines -1 to -4
[beman_submodule]
remote=https://github.com/bemanproject/infra-workflows.git
commit_hash=962bc39d246b4dd3e1fc34250a66d188610c30e7
allow_untracked_files=True
Copy link
Member

Choose a reason for hiding this comment

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

Isn't that needed for the Beman submodule stuff? ... or is that abandoned?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I synched with examplar, AFAIK we have only infra as beman_submodule?

Comment on lines -27 to -28
{"preset": "appleclang-debug", "runner": "macos-latest"},
{"preset": "appleclang-release", "runner": "macos-latest"},
Copy link
Member

Choose a reason for hiding this comment

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

what happened to these tests?

Copy link
Contributor Author

@ClausKlein ClausKlein Feb 20, 2026

Choose a reason for hiding this comment

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

In this case I synched with execution, I have to check again.

Co-authored-by: Dietmar Kühl <dietmar.kuehl@me.com>
@ClausKlein
Copy link
Contributor Author

ClausKlein commented Feb 20, 2026

I have build errors with apple clang on my iMAC?

bash-5.3$ cmake --preset appleclang-release --log-level=VERBOSE --fresh
Preset CMake variables:

  BEMAN_USE_MODULES:BOOL="FALSE"
  BEMAN_USE_STD_MODULE:BOOL="FALSE"
  CMAKE_BUILD_TYPE="RelWithDebInfo"
  CMAKE_CXX_EXTENSIONS:BOOL="TRUE"
  CMAKE_CXX_STANDARD="23"
  CMAKE_CXX_STANDARD_REQUIRED:BOOL="TRUE"
  CMAKE_EXPORT_COMPILE_COMMANDS:BOOL="TRUE"
  CMAKE_INSTALL_MESSAGE="LAZY"
  CMAKE_PROJECT_TOP_LEVEL_INCLUDES="infra/cmake/use-fetch-content.cmake"
  CMAKE_SKIP_TEST_ALL_DEPENDENCY:BOOL="FALSE"
  CMAKE_TOOLCHAIN_FILE="infra/cmake/appleclang-toolchain.cmake"

-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=/usr/local/include;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-- BEMAN_USE_MODULES=FALSE
-- BEMAN_USE_STD_MODULE=FALSE
-- CMAKE_CXX_SCAN_FOR_MODULES=OFF
-- beman-install-library(beman.execution): COMPONENT 'execution'
-- beman_install_library(beman.execution): EXPORT_NAME execution_headers for TARGET 'beman.execution_headers'
-- beman-install-library(beman.execution): 'beman.execution_headers' has INTERFACE_HEADER_SETS=public_headers;detail_headers
CMake Warning at cmake/beman-install-library.cmake:159 (message):
  beman_install_library(beman.execution): 'beman.execution' is not a target
Call Stack (most recent call first):
  CMakeLists.txt:102 (beman_install_library)

-- beman-install-library(beman.execution): Add find_dependency(Threads)
-- Configuring done (0.7s)
-- Generating done (0.2s)
-- Build files have been written to: /Users/clausklein/Workspace/cpp/beman-project/execution26/build/appleclang-release
bash-5.3$ pwd
/Users/clausklein/Workspace/cpp/beman-project/execution26
bash-5.3$ 

[1/215] Building CXX object tests/beman/execution/CMakeFiles/beman.execution.exec-env.test.dir/exec-env.test.cpp.o
FAILED: [code=1] tests/beman/execution/CMakeFiles/beman.execution.exec-env.test.dir/exec-env.test.cpp.o 
ccache /usr/bin/c++  -I/Users/clausklein/Workspace/cpp/beman-project/execution26/tests/beman/execution/include -I/Users/clausklein/Workspace/cpp/beman-project/execution26/include -isystem /usr/local/include -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1 -isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -O3  -O2 -g -DNDEBUG -std=gnu++23 -MD -MT tests/beman/execution/CMakeFiles/beman.execution.exec-env.test.dir/exec-env.test.cpp.o -MF tests/beman/execution/CMakeFiles/beman.execution.exec-env.test.dir/exec-env.test.cpp.o.d -o tests/beman/execution/CMakeFiles/beman.execution.exec-env.test.dir/exec-env.test.cpp.o -c /Users/clausklein/Workspace/cpp/beman-project/execution26/tests/beman/execution/exec-env.test.cpp
clang++: error: unable to execute command: Segmentation fault: 11
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: x86_64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /var/folders/wb/ckvxxgls5db7qyhqq4y5_l1c0000gq/T/exec-env-0a7287.cpp
clang++: note: diagnostic msg: /var/folders/wb/ckvxxgls5db7qyhqq4y5_l1c0000gq/T/exec-env-0a7287.sh
clang++: note: diagnostic msg: Crash backtrace is located in
clang++: note: diagnostic msg: /Users/clausklein/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang++: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang++: note: diagnostic msg: 

********************

@dietmarkuehl
Copy link
Member

beman.task is referencing a specific [older] version of beman.execution. I haven’t tried using modules from beman.task, yet (and this weekend I will likely not get around working on that while working on papers for the Monday submission deadline).


target_sources(beman.task PRIVATE task.cpp)

# TODO(CK): file(GLOB ...) must not used in production code!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dietmarkuehl NOTE this please!

Copy link
Member

Choose a reason for hiding this comment

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

My current plan is to migrate the content of task to beman.execution and update it to more closely match the specification. After that I think this repository contains just one file. However, I think I can actually just list few files anyway.

Comment on lines 29 to +55
FetchContent_Declare(
execution
# SOURCE_DIR ${CMAKE_SOURCE_DIR}/../execution
GIT_REPOSITORY https://github.com/bemanproject/execution
GIT_TAG a098f90
GIT_TAG 07d53da
SYSTEM
FIND_PACKAGE_ARGS
0.2.0
EXACT
NAMES
beman.execution
COMPONENTS
execution_headers
)
FetchContent_MakeAvailable(execution)

add_subdirectory(src/beman/task)

#===============================================================================
# NOTE: this must be done before tests! CK
include(./cmake/beman-install-library.cmake)
beman_install_library(${CMAKE_PROJECT_NAME} TARGETS ${CMAKE_PROJECT_NAME}
# TODO: DEPENDENCIES [===[beman.inplace_vector 1.0.0]===] [===[beman.scope 0.0.1 EXACT]===] fmt
DEPENDENCIES [===[beman.execution 0.2.0 EXACT]===]
)
#===============================================================================

Copy link
Contributor Author

@ClausKlein ClausKlein Feb 20, 2026

Choose a reason for hiding this comment

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

NOTE: this are the major cmake code changes!

@ClausKlein ClausKlein requested a review from ednolan February 20, 2026 16:11
Disable BEMAN_BUILDSYS_SANITIZER in cmake presets
@ClausKlein ClausKlein force-pushed the feature/prepare-cxx_modules-support branch from 02ecb44 to da2738f Compare February 20, 2026 19:51
@dietmarkuehl dietmarkuehl merged commit 5702972 into main Feb 20, 2026
36 checks passed
@dietmarkuehl dietmarkuehl deleted the feature/prepare-cxx_modules-support branch February 20, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants