tcbrindle / flux

A C++20 library for sequence-orientated programming
https://tristanbrindle.com/flux/
Boost Software License 1.0
472 stars 29 forks source link

Add experimental CMake module support #108

Closed tcbrindle closed 1 year ago

tcbrindle commented 1 year ago

If CMake is configured with FLUX_BUILD_MODULE=On (default is Off), then we'll attempt to build a module using add_module_library() from Victor Zverovich's modules.cmake.

We'll also attempt to build a small test program to verify that the module can be correctly imported.

Everything seems to work fine with Clang 16. MSVC generates the module and test program correctly, but seems to have trouble with flux::ref(), which rather rules out doing anything practical with modules right now.

With GCC 13, the Ninja generator currently runs into problems* building the module. With a Makefile generator, building the module succeeds, but the import fails complaining it can't find the generated module. I don't know if this is caused by a GCC bug or by modules.cmake.

codecov[bot] commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (141f271) 97.67% compared to head (1864f09) 97.67%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #108 +/- ## ======================================= Coverage 97.67% 97.67% ======================================= Files 66 66 Lines 2236 2236 ======================================= Hits 2184 2184 Misses 52 52 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.