arduino-cmake / Arduino-CMake-NG

CMake-Based framework for Arduino platforms
MIT License
138 stars 39 forks source link

Correct arduino compile command creation with unstripped parameters #103

Closed wgrs33 closed 1 year ago

wgrs33 commented 1 year ago

When configuring a project by cmake, some flags.make can contain unstripped newlines and extra spaces. This fix corrects it. Fix tested of Ubuntu 22.04.

Before:

CXX_FLAGS = -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=108019+dfsg1-1 
"-DARDUINO_AVR_NANO "

After:

CXX_FLAGS = -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=108019+dfsg1-1 -DARDUINO_AVR_NANO
MrPointer commented 1 year ago

I don't know if you missed the notice on the project's readme, but this is not maintained anymore, for over 3 years actually 😅
Regardless, your changes are small enough and LGTM, so I'll merge, but after that, I'll archive the repo to remove confusion.

Thanks for the support, the effort, and mostly - For understanding.