Replies: 4 comments
-
no any cppm file are compiled. you should use |
Beta Was this translation helpful? Give feedback.
-
I am sorry but I do not fully understand. The variable
Original files: |
Beta Was this translation helpful? Give feedback.
-
clang-scan-deps does not provide any dependency information about So xmake can't do anything. It's clang-scan-deps issue, not xmake. [ 0%]: <libtest> generating.module.deps src/test.cppm
/usr/local/Cellar/llvm/19.1.2/bin/clang-scan-deps --format=p1689 -- /usr/local/Cellar/llvm/19.1.2/bin/clang -x c++ -c src/test.c
ppm -o build/.objs/libtest/macosx/x86_64/release/src/test.cppm.o -Qunused-arguments -m64 -isysroot /Applications/Xcode.app/Conte
nts/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -fvisibility=hidden -fvisibility-inlines-hidden -O3 -std=c
++20 -DNDEBUG
{
"revision": 0,
"rules": [
{
"primary-output": "build/.objs/libtest/macosx/x86_64/release/src/test.cppm.o",
"provides": [
{
"is-interface": true,
"logical-name": "token",
"source-path": "src/test.cppm"
}
]
}
],
"version": 1
} |
Beta Was this translation helpful? Give feedback.
-
Thank you. I did some more research on this topic. Here is what I found so far:
clang seems to implements this. As result, the dependency information for headers is missing.
...
It seems to me the intention is that the build tool should get the dependencies between modules from the P1689 file, and the dependencies for preprocessor-includes should come from the traditional Makefile dependency files (via options Btw, I also tried the gcc toolchain (gcc 14.2). Here, the |
Beta Was this translation helpful? Give feedback.
-
I recently converted a project to use C++ modules and xmake at the same time. I am using LLVM-style .def "database" files. It seems that the dependency between the C++ module and the .def file is not known/ignored when building.
E.g. without modules:
This works as expected:
With the conversion to C++ modules I now have the following:
Now the object file of the module is not rebuild when the .def file changes:
What do I need to change that the missing dependency is added?
I am using xmake v2.9.7+dev.b029e65ed, clang 19.1.1, Ubuntu 24.10.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions