-
Notifications
You must be signed in to change notification settings - Fork 12
Fixed excessive memory consumption #38
Fixed excessive memory consumption #38
Conversation
@@ -48,11 +48,11 @@ function(make_arduino_library VAR_NAME BOARD_ID LIB_PATH COMPILE_FLAGS LINK_FLAG | |||
endforeach () | |||
|
|||
if (LIB_INCLUDES) | |||
string(REPLACE ";" " " LIB_INCLUDES "${LIB_INCLUDES}") | |||
string(REPLACE ";" " " LIB_INCLUDES_SPACE_SEPARATED "${LIB_INCLUDES}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the compiler command line generated with set_target_properties
below requires a space separated version of LIB_INCLUDES
.
If we replace the ;
in the cmake list LIB_INCLUDES
, the list(REMOVE_DUPLICATES LIB_INCLUDES)
call at the end of the function does not remove anything.
@noseglasses |
I can check this, but not sure how to do it? :) |
This PR changes two lines. If you did not change the respective lines or just moved them elsewhere, the problem will persist. As you apparently did not run into the problems I encountered (computer stalling because of memory exhaustion), you probably did not touch the respective lines. |
It is hard to tell whether I changed it or not because I refactored a lot of things, added and removed something in the process. So it is hard for me to tell if I fixed this problem or not because I never encountered theses issues in the first place :) so that's why I'm asking to check my branch if you encounter this problem, you'll see if it's gone or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good and simple, thank you.
Until @fraillt manages to organize his PRs better, I'm merging this one to fix the bug at least temporarily.
Nested calls to
make_arduino_library
cause an exponential groth of theLIB_INCLUDES
variable. This PR fixes it.