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

Rearchitected the chip folder structure #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Rearchitected the chip folder structure #46

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 10, 2019

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.

CMakeLists.txt Show resolved Hide resolved
set(SOURCES
count.cpp
)
set(ENABLED_CHIPS "" CACHE STRING "Enable each listed chip rather than auto-detect")
Copy link
Owner

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?

Copy link
Author

@ghost ghost Nov 15, 2019

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 "")
Copy link
Owner

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")
Copy link
Owner

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?

Copy link
Author

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.

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.

2 participants