Файл интерфейса moduletest.ixx :
Код: Выделить всё
export module moduleTest;
export int foo();
Код: Выделить всё
module moduleTest;
int foo() {
// some implementation
}
Это то, что я попробовал:
Код: Выделить всё
add_library(moduleTest)
target_sources(moduleTest
PRIVATE FILE_SET CXX_MODULES FILES
ModuleTest.ixx
PRIVATE
ModuleTest.cpp
)
target_compile_features(moduleTest PUBLIC cxx_std_20)
target_compile_options(moduleTest PRIVATE "-fmodules-ts")
< /code>
Сообщение об ошибке: < /p>
moduleTest: error: failed to read compiled module: No such file or directory
moduleTest: note: compiled module file is 'gcm.cache/moduleTest.gcm'
moduleTest: note: imports must be built before being imported
moduleTest: fatal error: returning to the gate for a mechanical issue
Код: Выделить всё
ModuleTest.cpp.oмодуль модуля.>
Подробнее здесь: https://stackoverflow.com/questions/796 ... elists-txt
Мобильная версия