Closed connorfuhrman closed 2 years ago
May have jumped the gun on this one... Editing the platform.txt
file from the Arduino IDE application folder seems to be working.
Sorry for the spam this issue is resolved by editing the Arduino platform.txt file for me!
Potential bug? I don't see any compiler warnings even though I expect some.
Is there a way to set compiler flags either globally or on a per-target basis? And is it expected to not see anything from a
#pragma message
directive?I've attempted to use the following:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
both before and after the toolchain file inclusion and with and without cacheingadd_definitions("-Wall -Wextra -pedantic")
target_compile_options(myLib PUBLIC -Wall -Wextra -pedantic)
However when I have an unused and uninitialized variable, e.g.,
I see no warnings.
And even when attempting either the
#pragma message "test"
or#warning "test"
I don't see any warnings printed to the screen. Switching to#error "test"
triggers a compile-time error and shows the message.Output from CMake config shown below running on MacOS 12.2 using Arduino SDK 1.8.19: