Specifying C++ Compiler Flags
Posted: Sat Jan 06, 2024 4:01 am
I would like to suppress a compiler warning by passing in -Wdeprecated-copy compiler option.
I'm not sure how I can do this with the IDF environment. I tried this first in my top-level CMakeLists.txt:
That didn't work so I tried old-school setting of CMAKE_CXX_FLAGS and CMAKE_C_FLAGS instead in both top-level and component level CMakeLists.txt:
I still get the compiler warning:
What am I doing wrong?
I'm not sure how I can do this with the IDF environment. I tried this first in my top-level CMakeLists.txt:
Code: Select all
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(paul_fabgl)
list (APPEND CFLAGS "-Wdeprecated-copy")
Code: Select all
set(CMAKE_CXX_FLAGS
"-Wdeprecated-copy")
set(CMAKE_C_FLAGS
"-Wdeprecated-copy")
Code: Select all
[build] C:\esp32\projects\paul_fabgl\components\fabgl\fabui.cpp: In member function void fabgl::uiCustomListBox::paintListBox()':
[build] C:\esp32\projects\paul_fabgl\components\fabgl\fabui.cpp:4189:61:warning: implicitly-declared 'constexpr fabgl::Rect& fabgl::Rect::operator=(const fabgl::Rect&)' is deprecated [-Wdeprecated-copy]