Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Modules TS & CMake

I am curious about the C++ Modules TS. I have played a little around with Clang's implementation. Only one or two files or so at a time.

Now I would like to try something bigger than that. And I would like to use CMake.

Does someone know if there is some good way to use the Clang modules implementation with CMake or are there already some CMake modules which help me with this?

I would really like to know. Otherwise I have to consider using a different build system.

like image 560
Thorum357 Avatar asked Oct 02 '17 12:10

Thorum357


1 Answers

I would suggest you try build2:
https://build2.org/build2/doc/build2-build-system-manual.xhtml#cxx-modules
It supports modules for Visual Studio, gcc and clang. And for gcc there is a package that contains the standard library:
https://build2.org/pkg/hello/libstd-modules?f=full&q=library
Note that Microsoft implementation, as of Visual Studio 2017 update 4, is using the old syntax in the .ixx files (module xyz; instead of export module xyz; where the latter is what the last Modules TS draft mandates)

like image 168
Gerardo Hernandez Avatar answered Oct 12 '22 21:10

Gerardo Hernandez