How to use include a pure interface with Cmake with c++ 20 and modules?

77 views Asked by At

I am using cmake with c++ 20 and modules. The code is distributed over a set of folders:

 - a
   - src
     a.cppm
 - b
   - src 
     b.cppm
 - interface
   - inc
     if.cppm

I have a set of structs I need to use from interface, in modules a and modules b, like a classic include dependency. Module a and b uses types from interface if.cppm.

What will the CmakeLists.txt look like for interface and for a? if.cppm is a pure interface (maybe I should just be a header file?)

0

There are 0 answers