Cannot geth a simple project that references cpp_utils to compile. Probably something simple I am missing…but haven’t had much luck after moving to the esp idf 4.0 library with the current platformio update.
* boards
* components
* -- cpp_utils
* ----CMakeLists.txt
* src
* -- main.cpp
* -- CMakeLists.txt
* CMakeLists.txt
* partition_custom.csv
* platform.ini
Top Level CMakeLists.txt
cmake_minimum_required(VERSION 3.16.0)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(combineEsp)
src/CMakeLists.txt:
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
idf_component_register(SRCS ${app_sources})
components/cpp_utils/CMakeLists.txt
set(COMPONENT_REQUIRES
"console"
"fatfs"
"json"
"mdns"
"nvs_flash"
"bt"
)
set(COMPONENT_PRIV_REQUIRES )
file(GLOB COMPONENT_SRCS
LIST_DIRECTORIES false
"*.h"
"*.cpp"
"*.c"
"*.S"
)
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()
I didn’t even include the components folder in the top level CMakeLists.txt and it is trying to build c++, even with a main.c. Maybe I am just so far down the rabbit hole that I am over complicating it…
I tried adding the CXX exceptions into sdkconfig.defaults, but that didn’t seem to work, and if I try to add it into sdkconfig it gets overwritten during the build process…
CONFIG_CXX_EXCEPTIONS into