-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using set(${PROJECT_NAME}_SRCS ) has no effect on compile #17
Comments
@rklosinski, did you reload the CMakeLists.txt after modifying it? The IDE needs to reload the file to change its project build files. |
yes I did |
@rklosinski, just figured out that if you want to include extra cpp files in the project then instead of Loading CMakeLists.txt now recognizes all .cpp and .h files as part of the project. This must be somewhere in the docs of Arduino CMake but I don't remember coming across it. With a sketch file all the .cpp files need to be included into the .ino file as part of its source. |
@vsch Thanks! I'll try that when Im able to get back to my Arduino project. another project's priority just bumped it down a notch. |
For future reference (edit these two lines in your own project): francoiscampbell/arduino-cmake#10 After this de _SKETCH, _SRCS and _HDRS all work. |
Just installed the latest version of this plugin. Skeleton code compiled and uploaded fine. So I tried adding a new class (test cpp/h) then added them to the CMakeList.txt file using set(${PROJECT_NAME}_SRCS test.cpp) and set(${PROJECT_NAME}_HDRS User_Setup.h test.h). This had no effect on the outcome of the compile.
What did worked was to change set(${PROJECT_NAME}_SRCS) and set(${PROJECT_NAME}_HDRS User_Setup.h), then rename test.cpp to test.ino. It seems only ino files are searched for automatically, and set(${PROJECT_NAME}_SRCS) is broken.
The text was updated successfully, but these errors were encountered: