Skip to content

Commit 6a6ee76

Browse files
committed
update the readme.md for modules information.
1 parent d30afca commit 6a6ee76

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,32 @@ Full runnable examples can be found in `examples/`.
8585
## Integrate beman.scope into your project
8686

8787
Beman.scope is a header-only library that currently relies on TS implementations
88-
and is thus currently available only on GCC13 and up, or Clang 19 and up -- in C++20 mode.
88+
and is thus currently available only on g++-13 and up, or clang 19 and up -- in C++20 mode.
89+
90+
Note that modules support is currently tested only on clang++-19 and above and g++-15.
8991

9092
As a header only library no building is required to use in a project -- simply make
9193
the `include` directory available add add the following to your source.
9294

9395
```cpp
9496
#include <beman/scope/scope.hpp>
97+
98+
//modular version
99+
100+
import beman.scope;
95101
```
102+
With g++-15 modules is import needs to be after any includes to avoid compilation errors.
96103

97104
## Building beman.scope
98105

99-
Building is only required to run tests and examples.
106+
Building is only required to run tests and examples. All compilers build and
107+
run `include` based tests. Compilers known to support modules are automatically
108+
detected added to tests.
100109

101110
### Build Dependencies
102111

103-
The library itself has no build dependencies other than Catch2 for testing
104-
and cmake.
112+
The library itself has no build dependencies other than Catch2 for testing.
113+
And for building cmake and ninja. Makefiles are supported in non-modular builds.
105114

106115
Build-time dependencies:
107116

@@ -110,14 +119,21 @@ Build-time dependencies:
110119
- CMake defaults to "Unix Makefiles" on POSIX systems
111120
- `catch2` for building tests
112121

113-
### How to build beman.scope
122+
### How to build beman.scope tests and examples
123+
124+
from root of repo:
114125

115126
```shell
116-
cmake --workflow --preset gcc-debug
127+
mkdir build; cd build;
128+
cmake .. -DCMAKE_CXX_COMPILER=g++-15 -DCMAKE_CXX_STANDARD=26 -G=Ninja
129+
ninja -j 5 -v; ctest
130+
```
131+
132+
or using cmake presets
133+
```shell
117134
cmake --workflow --preset gcc-release
118135
cmake --install build/gcc-release --prefix /opt/beman.scope
119136
```
120-
121137
# License
122138

123139
Source is licensed with the Apache 2.0 license with LLVM exceptions

0 commit comments

Comments
 (0)