Skip to content

Commit 87c2699

Browse files
antmaksuren-gabrielyan-espressif
authored andcommitted
cmake: fix issue with passing cxx_std option for GCC 11, a common workaround
* Original commit: espressif/esp-idf@ea0d212
1 parent eb536a7 commit 87c2699

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

components/mdns/host_test/components/esp_timer_linux/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ idf_component_register(SRCS esp_timer_linux.c timer_task.cpp
22
INCLUDE_DIRS include
33
REQUIRES esp_system_protocols_linux freertos_linux)
44

5-
target_compile_features(${COMPONENT_LIB} PRIVATE cxx_std_17)
5+
set_target_properties(${COMPONENT_LIB} PROPERTIES
6+
CXX_STANDARD 17
7+
CXX_STANDARD_REQUIRED ON
8+
CXX_EXTENSIONS ON
9+
)

components/mdns/host_test/components/freertos_linux/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ idf_component_register(SRCS freertos_linux.c queue_unique_ptr.cpp
44

55
set(THREADS_PREFER_PTHREAD_FLAG ON)
66
find_package(Threads REQUIRED)
7-
target_link_libraries(${COMPONENT_LIB} PRIVATE Threads::Threads)
7+
target_link_libraries(${COMPONENT_LIB} PRIVATE Threads::Threads)
88

9-
target_compile_features(${COMPONENT_LIB} PRIVATE cxx_std_17)
9+
set_target_properties(${COMPONENT_LIB} PROPERTIES
10+
CXX_STANDARD 17
11+
CXX_STANDARD_REQUIRED ON
12+
CXX_EXTENSIONS ON
13+
)

0 commit comments

Comments
 (0)