Skip to content

cxxmodules: Fix some issues module exporting

Tyler Nichols requested to merge tylerbrawl/cmake:misc-cxx-modules-fixes into master

The following issues were addressed:

  • When setting the IMPORTED_CXX_MODULES_[CONFIG] target property, there was a missing path separator between a module's file name and its relative directory.

  • Calling install(EXPORT) with the CXX_MODULES_DIRECTORY parameter leads to installation rules being generated which include() CMake scripts that set the IMPORTED_CXX_MODULES_[CONFIG] target property for relevant targets. However, these scripts don't get generated for targets in an export set which don't have any C++20 modules. When the installation rules attempt to include() the missing scripts, the install fails.

Merge request reports