Use C++ 23
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
|
||||
project(app LANGUAGES C)
|
||||
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
target_sources(app PRIVATE src/main.cpp)
|
||||
|
||||
# The code below locates the git index file for this repository and adds it as a dependency for
|
||||
# the application VERSION file so that if the repo has a new commit added, even if no files in
|
||||
|
||||
@@ -3,5 +3,9 @@
|
||||
#
|
||||
# This file contains selected Kconfig options for the application.
|
||||
|
||||
# C++
|
||||
CONFIG_CPP=y
|
||||
CONFIG_STD_CPP23=y
|
||||
|
||||
CONFIG_SENSOR=y
|
||||
CONFIG_BLINK=y
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
|
||||
LOG_MODULE_REGISTER(main, CONFIG_APP_LOG_LEVEL);
|
||||
|
||||
int main(void) {
|
||||
int main() {
|
||||
printk("Zephyr Example Application %s\n", APP_VERSION_STRING);
|
||||
printk("Build with C++ standard: %ldL\n", __cplusplus);
|
||||
|
||||
while (1) {
|
||||
while (true) {
|
||||
printk("Running...\n");
|
||||
k_sleep(K_SECONDS(5));
|
||||
}
|
||||
Reference in New Issue
Block a user