From 3a843946f03fab844e198d3f38dca19b7e7cd177 Mon Sep 17 00:00:00 2001 From: Vinicius Trevisan <36710856+vinicius-trev@users.noreply.github.com> Date: Sat, 1 Feb 2025 07:04:08 -0300 Subject: [PATCH] [CMAKE]: Compile Target Options for ESP32 Platform (#540) * fix(cmake): compile target options for ESP32 platform * Fix missplaced not --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3b6b4da..84b09e8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,9 @@ if(BUILD_TESTING set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") endif() -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +if(ESP_PLATFORM) + add_compile_options(-Wall -Wextra) +elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif()