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

dropdown list of possible boards to set ARDUINO_DEFAULT_BOARD #165

Open
carrardt opened this issue Mar 19, 2016 · 0 comments
Open

dropdown list of possible boards to set ARDUINO_DEFAULT_BOARD #165

carrardt opened this issue Mar 19, 2016 · 0 comments

Comments

@carrardt
Copy link

Using cmake code like the following in example/CMakeLists.txt, you can show user a dropdown list of (when using cmake-gui) or cycle through (when using ccmake) possible boards instead of typing its name into ARDUINO_DEFAULT_BOARD. I find this more convenient than copy-pasting from printed list.

foreach(PLATFORM ${ARDUINO_PLATFORMS})
set(ARDUINO_BOARD_LIST ${ARDUINO_BOARD_LIST} ${${PLATFORM}_BOARDS})
endforeach()
set(ARDUINO_DEFAULT_BOARD uno CACHE STRING "Default Board") # Default Board ID, when not specified
set_property(CACHE ARDUINO_DEFAULT_BOARD PROPERTY STRINGS ${ARDUINO_BOARD_LIST})

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

No branches or pull requests

1 participant