Skip to content

Commit 3e5c474

Browse files
authored
Minor fixes for modules (#200)
1 parent c902451 commit 3e5c474

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ project(boost_pfr VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
1111
if (BOOST_USE_MODULES)
1212
add_library(boost_pfr)
1313
target_sources(boost_pfr PUBLIC
14-
FILE_SET modules_public TYPE CXX_MODULES FILES
15-
${CMAKE_CURRENT_LIST_DIR}/modules/pfr.cppm
14+
FILE_SET modules_public TYPE CXX_MODULES FILES modules/boost_pfr.cppm
1615
)
1716

1817
target_compile_features(boost_pfr PUBLIC cxx_std_20)

doc/pfr.qbk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,19 +569,19 @@ benifits of modules without changing the existing code.
569569
[note For better compile times make sure that `import std;` is available when building the `boost.pfr` module (in CMake logs there should be
570570
a 'Using `import std;`' message). ]
571571

572-
If not using CMake, then the module could be build manually from the `module/pfr.cppm` file.
572+
If not using CMake, then the module could be build manually from the `modules/boost_pfr.cppm` file.
573573

574-
For manual module build the following commands could be used for clang compiler:
574+
For manual module build the following commands can be used for clang compiler:
575575

576576
```
577577
cd pfr/module
578-
clang++ -I ../include -std=c++20 --precompile -x c++-module pfr.cppm
578+
clang++ -I ../include -std=c++20 --precompile -x c++-module boost_pfr.cppm
579579
```
580580

581581
After that, the module could be used in the following way:
582582

583583
```
584-
clang++ -std=c++20 -fmodule-file=pfr.pcm pfr.pcm usage_sample.cpp
584+
clang++ -std=c++20 -fmodule-file=boost_pfr.pcm boost_pfr.pcm usage_sample.cpp
585585
```
586586

587587
[endsect]
File renamed without changes.

0 commit comments

Comments
 (0)