CMake Build System require the main module to be called "main"
Posted: Wed Sep 18, 2019 4:39 pm
I am trying to switch from the gnu make to CMake build system and faced with a problem: some header files are not visible from my "main.c" file. The key thing is that I've moved my project from ESP8266 and my "main" code lays within "user" dir.
After digging CMake related files I found that there are some places with the main component name hardcoded as "main"
in file expand_requirements.cmake (line 49):
As for me, the user should be able to name its "main" directory as he wants, but currently, it is impossible without IDF files to be edited.
After digging CMake related files I found that there are some places with the main component name hardcoded as "main"
in file expand_requirements.cmake (line 49):
Code: Select all
# Dummy register_component used to save requirements variables as global properties, for later expansion
#
# (expand_component_requirements() includes the component CMakeLists.txt, which then sets its component variables,
# calls this dummy macro, and immediately exits again.)
macro(register_component)
if(COMPONENT STREQUAL main AND NOT COMPONENT_REQUIRES)
set(main_component_requires ${COMPONENTS})
list(REMOVE_ITEM main_component_requires "main")