11 lines
453 B
Markdown
11 lines
453 B
Markdown
|
|
# with-module
|
||
|
|
|
||
|
|
Adds a C++ module interface (`interfaces/Greeter.cppm`) imported by `main.cpp`.
|
||
|
|
|
||
|
|
```sh
|
||
|
|
cd examples/with-module
|
||
|
|
crafter-build
|
||
|
|
./bin/greeter-app-x86_64-pc-linux-gnu-native/greeter-app
|
||
|
|
```
|
||
|
|
|
||
|
|
Interfaces are listed by their stem path (relative to `cfg.path`, no `.cppm` extension). The build emits `Greeter.pcm` once and `main_impl.o` consumes it. Touching `interfaces/Greeter.cppm` causes only `main_impl.o` to recompile, not the whole world.
|