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

WIP: cmake cleanup #241

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

conte91
Copy link
Contributor

@conte91 conte91 commented Dec 2, 2019

Extract common files in the CMakeLists.txt when possible, to avoid recompiling the same source file over and over with different flags.

@conte91 conte91 force-pushed the hsm_cmake_cleanup branch 3 times, most recently from 58fe31e to 85e65cf Compare December 4, 2019 09:29
@conte91 conte91 changed the base branch from hsm to master December 4, 2019 10:13
As the files related to APP_BTC don't depend on any PRODUCT* macro,
but only on the APP_* macros, move those to a separate CMake unit
(app_btc-multi, app_btc-btc), to avoid multiple unnecessary
compilations.
Most of the workflow, components, and UI code doesn't depend
on the platform it will be run on. Compile it only once to save
many CMake build entries.

The gestures code is a dependency of most components, but it has
a slight dependency on the hardware platform. Split it into an API
and an implementation file to let including the header possible without
having to define the platform the code will run on.
Instead of #defininig all the possible PRODUCT_ macros, it
makes more sense to enforce the definition of the (limited)
PLATFORM_ and EDITION_ macros, and extract the relevant definitions
of PRODUCT_* from there. This makes it easier to enforce that the macros
are defined consistently, and allows further separation of code that is
dependent on the platform it will run on, but not on the edition (e.g.
the touch code depends on the PLATFORM_*, but it doesn't matter whether
it will run on a -multi or on a -btconly device).
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