-
Book Overview & Buying
-
Table Of Contents
Software Architecture with C++ - Second Edition
By :
Conan has no native module awareness, and, therefore, building and integration of C++ modules is handled by the build system—typically, CMake. CMake supports C++ modules since version 3.28 and experimentally imports the std module since version 3.29. At the time of writing, there is no official approach to distributing C++ modules with CMake. So, we use a workaround to achieve this. The other build systems—in particular, Xmake, Build2, Meson, and MSVC Build Tools—also support C++ modules to varying degrees.
Creating and testing Conan packages is described in Chapter 8, Package Management. Our Conan script follows almost the same approach, except for a few key differences—this example does not require external libraries, and only Ninja and Visual Studio generators support scanning sources required for C++ modules to find their dependencies:
class StoresConan(ConanFile):
name = "stores"
...
def generate...