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

Define a TRIBOL_USE_REDECOMP to use in source #111

Open
ebchin opened this issue Oct 31, 2024 · 1 comment
Open

Define a TRIBOL_USE_REDECOMP to use in source #111

ebchin opened this issue Oct 31, 2024 · 1 comment
Assignees

Comments

@ebchin
Copy link
Member

ebchin commented Oct 31, 2024

Use TRIBOL_USE_REDECOMP in source instead of BUILD_REDECOMP to match the style used with other #ifdefs

@ebchin ebchin self-assigned this Oct 31, 2024
@giraldeau
Copy link

At this time, Tribol fails to build because BUILD_REDECOMP is undefined at the time TribolConfig.cmake is generating the config.hpp file.

The variable BUILD_REDECOMP is set in src/CMakeLists.txt file, and in CMake the variables have a directory scope, therefore it is still undefined in the parent scope.

As a temporary workaround, I added the option in cmake/Options.cmake and it fixes the issue.

option(TRIBOL_USE_REDECOMP "Enable redecomp" ON)
set(BUILD_REDECOMP ${TRIBOL_USE_REDECOMP})

But why is this an option in the first place, if the library does not build without it? Maybe it should be a mandatary dependency?

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

2 participants