I struggle over the CXX_MODULES install BMI. Sometimes this has no effect or some BMI files are missing?
see to Why are the build and installed BMI files not used?
I use always this cmake install function call:
install(
TARGETS "${_tgt}"
EXPORT ${BOOST_EXPORT_NAME}
ARCHIVE
${_lib_install_dir}
COMPONENT "${install_component_name}_Development"
LIBRARY
${_lib_install_dir}
COMPONENT "${install_component_name}_Runtime"
NAMELINK_COMPONENT "${install_component_name}_Development"
RUNTIME
${_bin_install_dir}
COMPONENT "${install_component_name}_Runtime"
${_install_header_set_args}
FILE_SET ${_module_sets}
DESTINATION "${BOOST_DESTINATION}"
COMPONENT "${install_component_name}_Development"
# NOTE: There's currently no convention for this location! CK
CXX_MODULES_BMI
DESTINATION
${_config_install_dir}/bmi-${CMAKE_CXX_COMPILER_ID}_$<CONFIG>
COMPONENT "${install_component_name}_Development"
)
/Users/clausklein/.local/lib/cmake/modules_triangle/
βββ cxx-modules
β βββ cxx-modules-modules_triangle-targets-Release.cmake
β βββ cxx-modules-modules_triangle-targets.cmake
β βββ target-library__a-Release.cmake
β βββ target-library__c-Release.cmake
βββ modules
β βββ library_a.cppm
β βββ library_c.cppm
βββ modules_triangle-config-version.cmake
βββ modules_triangle-config.cmake
βββ modules_triangle-targets-release.cmake
βββ modules_triangle-targets.cmake
3 directories, 10 files
iMac:modules-triangle clausklein$
or i.e. 2 CXX_MODULES, but only 1 BMI?
bash-5.3$ tree /Users/clausklein/.local/lib/cmake/modules_playground
/Users/clausklein/.local/lib/cmake/modules_playground
βββ bmi-Clang_Release
β βββ mylib.pcm
βββ cxx-modules
β βββ cxx-modules-modules_playground-targets-Release.cmake
β βββ cxx-modules-modules_playground-targets.cmake
β βββ target-play__hello-Release.cmake
β βββ target-play__mylib-Release.cmake
βββ modules
β βββ M.cppm
β βββ interface_part.cppm
β βββ mylib.cppm
βββ modules_playground-config-version.cmake
βββ modules_playground-config.cmake
βββ modules_playground-targets-release.cmake
βββ modules_playground-targets.cmake
4 directories, 12 files
bash-5.3$