Currently the upload API requires users to comment-out the upload function if they simply intend to build their project, otherwise the build will fail as it depends on the upload target.
This is a really bad and inconvenient API, thus it should be changed.
The old arduino-cmake project defined a target for uploading, which users could then build whenever they need to upload their code besides building it.
Similar approach should be taken here.
Currently the upload API requires users to comment-out the upload function if they simply intend to build their project, otherwise the build will fail as it depends on the upload target. This is a really bad and inconvenient API, thus it should be changed.
The old arduino-cmake project defined a target for uploading, which users could then build whenever they need to upload their code besides building it. Similar approach should be taken here.