I'm trying to enable C++ Exceptions for Zephyr (Version 3.2.99). The documentation only states, that CONFIG_EXCEPTIONS must be enabled.
Where do I have to enable cpp exceptions, so that -fno-exceptions
is not passed?
I enabled it in the CMakeLists.txt
cmake_minimum_required(VERSION 3.20.0)
set(BOARD xiao_ble)
find_package(Zephyr)
project(my_project)
# ...
target_sources(app PRIVATE
src/main.cpp
# ...
)
target_compile_options(app PRIVATE -fexceptions)
and in the KConfig (prj.conf):
# CPP
CONFIG_CPLUSPLUS=y
CONFIG_EXCEPTIONS=y
# ...
but still a -fno-exceptions
is passed when building the project.