-
Notifications
You must be signed in to change notification settings - Fork 1
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
Rearchitected the chip folder structure #46
base: master
Are you sure you want to change the base?
Conversation
set(SOURCES | ||
count.cpp | ||
) | ||
set(ENABLED_CHIPS "" CACHE STRING "Enable each listed chip rather than auto-detect") |
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.
should you only set this ifndef AUTO_ENABLE_CHIPS?
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 is tricky, it would require a FORCE
over the user's selection so I'm inclined to think it's better this way.
if (all)
glob cmake files
else if (some)
check some exists
else
none enabled
count.cpp | ||
) | ||
set(ENABLED_CHIPS "" CACHE STRING "Enable each listed chip rather than auto-detect") | ||
set(found_chips "") |
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.
similarly, should you only enable this ifdef AUTO_ENABLE_CHIPS?
file(GLOB_RECURSE found_chips "*chip.cmake") | ||
else() | ||
foreach(_chip ${ENABLED_CHIPS}) | ||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_chip}/chip.cmake") |
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.
Doesn't this fail silently if the chip is in the enable list but not found?
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.
There's a line about which chips were turned on. I think when someone says -DENABLED_CHIPS="blah blah" and then don't see one of the chips in the output that's a good indicator.
This allows us to select and add new chips at configure time. Paves the way for defining optional modules and chat integrations that are not required.