I am trying to follow new style of codding and I think that it's time to start new project with C++ Modules
but I get in troubles with compilation.
I just try to follow official tutorial from KitWare site https://www.kitware.com/import-cmake-th ... t-is-over/
and combine it with material from this forum
my CMakeLists.txt:
Code: Select all
add_library(mod)
target_sources(mod
PUBLIC
FILE_SET CXX_MODULES FILES
"mod.cxx"
)
idf_component_register(SRCS "main.cxx"
INCLUDE_DIRS ".")
target_link_libraries(COMPONENT_LIB PUBLIC mod)
but it seams that "add_library" command is not supported:
CMake Error at D:/Espressif/frameworks/esp-idf-v5.3/tools/cmake/component.cmake:225 (message):
CMake Warning (dev) at build_properties.temp.cmake:8:
Syntax Warning in cmake code at column 106
Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
D:/Espressif/frameworks/esp-idf-v5.3/tools/cmake/scripts/component_get_requirements.cmake:3 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
fatal: not a git repository (or any of the parent directories): .git
CMake Error at C:/Users/lukash256/esp32
proj/tstForGopher/main/CMakeLists.txt:2 (add_library):
add_library command is not scriptable
Call Stack (most recent call first):
D:/Espressif/frameworks/esp-idf-v5.3/tools/cmake/scripts/component_get_requirements.cmake:107 (include)
D:/Espressif/frameworks/esp-idf-v5.3/tools/cmake/scripts/component_get_requirements.cmake:127 (__component_get_requirements)
Call Stack (most recent call first):
D:/Espressif/frameworks/esp-idf-v5.3/tools/cmake/build.cmake:586 (__component_get_requirements)
D:/Espressif/frameworks/esp-idf-v5.3/tools/cmake/project.cmake:710 (idf_build_process)
CMakeLists.txt:11 (project)
-- Configuring incomplete, errors occurred!
sooo Can anybody share knowledges about building esp_idf project based on c++ Modules ?