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

Add option to configure and build without graphics #8

Merged

Conversation

rafbiels
Copy link
Collaborator

Make the configuration and build of graphical demos and their dependencies (Magnum, Corrade, SDL2) depend on a new CMake cache variable ENABLE_GRAPHICS. Auto-configure this new variable based on the result of find_package(SDL2).

A warning is emitted if ENABLE_GRAPHICS is unset and SDL2 is not found. The warning can be silenced by explicitly setting the option to OFF. In case the option is explicitly set to ON and SDL2 is not found, a fatal error is emitted. In summary, the auto-configuration for ENABLE_GRAPHICS works as follows:

command-line ENABLE_GRAPHICS SDL2 found no SDL2
unset auto-set ON auto-set OFF + WARNING
ON keep ON FATAL ERROR
OFF keep OFF keep OFF

Add an explanation of the new option in the README.

Add a new CI step building the no-graphics version using stock intel/oneapi-basekit container. Set ENABLE_GRAPHICS=ON explicitly in the baseline CI build.

Make the configuration and build of graphical demos and
their dependencies (Magnum, Corrade, SDL2) depend on a
new CMake cache variable ENABLE_GRAPHICS. Auto-configure
this new variable based on the result of find_package(SDL2).

A warning is emitted if ENABLE_GRAPHICS is unset and SDL2 is
not found. The warning can be silenced by explicitly setting
the option to OFF. In case the option is explicitly set to ON
and SDL2 is not found, a fatal error is emitted.

Add an explanation of the new option in the README.

Add a new CI step building the no-graphics version. Set
ENABLE_GRAPHICS=ON explicitly in the baseline CI build.
@DuncanMcBain DuncanMcBain merged commit 065e5af into codeplaysoftware:main Feb 14, 2024
4 checks passed
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