From a2ca5d03c5fa63a5cf42581ca3b652b16bd8e062 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 3 Jun 2022 12:50:15 +0200 Subject: [PATCH] examples, components: remove C/C++ standard overrides ...where they are not necessary after switching to C17 and C++20. --- components/driver/CMakeLists.txt | 3 --- components/esp_eth/CMakeLists.txt | 3 --- components/esp_event/CMakeLists.txt | 5 ----- .../esp_mqtt_cxx/components/esp_mqtt_cxx/CMakeLists.txt | 2 -- .../cxx/experimental/esp_mqtt_cxx/ssl/main/CMakeLists.txt | 2 -- .../cxx/experimental/esp_mqtt_cxx/tcp/main/CMakeLists.txt | 1 - 6 files changed, 16 deletions(-) diff --git a/components/driver/CMakeLists.txt b/components/driver/CMakeLists.txt index 1997c6d757..4f2c65b4b7 100644 --- a/components/driver/CMakeLists.txt +++ b/components/driver/CMakeLists.txt @@ -127,6 +127,3 @@ else() REQUIRES esp_pm esp_ringbuf freertos soc hal esp_hw_support LDFRAGMENTS linker.lf) endif() - -# uses C11 atomic feature -set_source_files_properties(spi_master.c PROPERTIES COMPILE_FLAGS -std=gnu11) diff --git a/components/esp_eth/CMakeLists.txt b/components/esp_eth/CMakeLists.txt index 56119ae9b6..5f2f506045 100644 --- a/components/esp_eth/CMakeLists.txt +++ b/components/esp_eth/CMakeLists.txt @@ -53,6 +53,3 @@ idf_component_register(SRCS "${srcs}" INCLUDE_DIRS ${include} REQUIRES "esp_event" # For using "ESP_EVENT_DECLARE_BASE" in header file PRIV_REQUIRES ${priv_requires}) - -# uses C11 atomic feature -set_source_files_properties(src/esp_eth.c PROPERTIES COMPILE_FLAGS -std=gnu11) diff --git a/components/esp_event/CMakeLists.txt b/components/esp_event/CMakeLists.txt index eb934b102f..4580a887d3 100644 --- a/components/esp_event/CMakeLists.txt +++ b/components/esp_event/CMakeLists.txt @@ -25,8 +25,3 @@ idf_component_register(SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires} LDFRAGMENTS linker.lf) - -if(CONFIG_ESP_EVENT_LOOP_PROFILING) - # uses C11 atomic feature - set_source_files_properties(esp_event.c PROPERTIES COMPILE_FLAGS -std=gnu11) -endif() diff --git a/examples/cxx/experimental/esp_mqtt_cxx/components/esp_mqtt_cxx/CMakeLists.txt b/examples/cxx/experimental/esp_mqtt_cxx/components/esp_mqtt_cxx/CMakeLists.txt index 5dd0329d08..15809a21ef 100644 --- a/examples/cxx/experimental/esp_mqtt_cxx/components/esp_mqtt_cxx/CMakeLists.txt +++ b/examples/cxx/experimental/esp_mqtt_cxx/components/esp_mqtt_cxx/CMakeLists.txt @@ -4,8 +4,6 @@ idf_component_register(SRCS "esp_mqtt_cxx.cpp" INCLUDE_DIRS "include" ) -target_compile_options(${COMPONENT_LIB} PRIVATE "-std=gnu++17") - if(TEST_BUILD) message(STATUS "Test build") idf_component_get_property(mqtt_dir mqtt COMPONENT_DIR) diff --git a/examples/cxx/experimental/esp_mqtt_cxx/ssl/main/CMakeLists.txt b/examples/cxx/experimental/esp_mqtt_cxx/ssl/main/CMakeLists.txt index 9871f4c78f..e06e5975be 100644 --- a/examples/cxx/experimental/esp_mqtt_cxx/ssl/main/CMakeLists.txt +++ b/examples/cxx/experimental/esp_mqtt_cxx/ssl/main/CMakeLists.txt @@ -1,4 +1,2 @@ idf_component_register(SRCS "mqtt_ssl_example.cpp" INCLUDE_DIRS ".") - -target_compile_options(${COMPONENT_LIB} PRIVATE "-std=gnu++17") diff --git a/examples/cxx/experimental/esp_mqtt_cxx/tcp/main/CMakeLists.txt b/examples/cxx/experimental/esp_mqtt_cxx/tcp/main/CMakeLists.txt index 07fa3e75c9..eeaa9534e5 100644 --- a/examples/cxx/experimental/esp_mqtt_cxx/tcp/main/CMakeLists.txt +++ b/examples/cxx/experimental/esp_mqtt_cxx/tcp/main/CMakeLists.txt @@ -1,3 +1,2 @@ idf_component_register(SRCS "mqtt_tcp_example.cpp" INCLUDE_DIRS ".") -target_compile_options(${COMPONENT_LIB} PRIVATE "-std=gnu++17")