Skip to content
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

Simplify linking of custom Arduino libraries #41

Open
wants to merge 1 commit into
base: release-1.1-dev
Choose a base branch
from

Conversation

a9183756-gh
Copy link
Owner

If a custom arduino library is added using add_custom_arduino_library
or add_custom_arduino_core, then all the targets, within the directory
tree, link with that custom arduino library. Earlier mechanism, which
is still supported, required explicit linking and was inflexible and
confusing especially when some arduino libraries are linked
automatically.

Example:
add_custom_arduino_core(my_core)
# If the following linking happens within the current cmake
# directory tree, then my_target links with my_core, instead of
# the inbuilt core.
target_link_arduino_libraries(my_target core)

In future, an explicit scoping mechanism for the custom libraries may
be provided (SCOPE_LOCAL, SCOPE_GLOBAL, SCOPE_TREE). The default scope
is SCOPE_TREE (which is the current behaviour in this patch).

If a custom arduino library is added using add_custom_arduino_library
or add_custom_arduino_core, then all the targets, within the directory
tree, link with that custom arduino library. Earlier mechanism, which
is still supported, required explicit linking and was inflexible and
confusing especially when some arduino libraries are linked
automatically.

Example:
	add_custom_arduino_core(my_core)
	# If the following linking happens within the current cmake
	# directory tree, then my_target links with my_core, instead of
	# the inbuilt core.
	target_link_arduino_libraries(my_target core)

In future, an explicit scoping mechanism for the custom libraries may
be provided (SCOPE_LOCAL, SCOPE_GLOBAL, SCOPE_TREE). The default scope
is SCOPE_TREE (which is the current behaviour in this patch).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant