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

cmake: rewrite the build options and the flag setting #51

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

illwieckz
Copy link
Member

@illwieckz illwieckz commented Jun 25, 2024

Rewrite the options and the flag setting

  • Add USE_LTO to enable LTO,
    enabled by default.
  • Add USE_EXTRA_OPTIMIZATION to also enable -O3 when it is not used by default
    enabled by default.
  • Add USE_FAST_MATH, to produce reproducible CRN files this should be disabled,
    enabled by default.
  • Increase warning verbosity level.
  • Generate maximum amount of debug information, including macro definitions.
  • Always disable strict aliasing, the code requires it to always be disabled.

Fixes #29:

- Add USE_LTO to enable LTO,
  enabled by default.
- Add USE_EXTRA_OPTIMIZATION to also enable -O3 when it is not used by default
  enabled by default.
- Add USE_FAST_MATH, to produce reproducible CRN files this should be disabled,
  enabled by default.
- Increase warning verbosity level.
- Generate maximum amount of debug information, including macro definitions.
- Always disable strict aliasing, the code requires it to always be disabled.

Fixes #29
@illwieckz illwieckz changed the title Implement extra build optimization on MSVC an rename OPTIMIZE_RELEASE as OPTIMIZE_BUILD cmake: rewrite the build options and the flag setting Jun 26, 2024
@illwieckz illwieckz force-pushed the illwieckz/optimize branch 2 times, most recently from 924ab20 to 5cfbc69 Compare June 26, 2024 13:09
@illwieckz
Copy link
Member Author

This also changes spaces for the 5% of the remaining untouched code. I was annoyed by the whitespace ascii art and anyway I almost rewrote everything.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@illwieckz illwieckz force-pushed the illwieckz/optimize branch 3 times, most recently from bfea00c to b58e434 Compare June 28, 2024 13:16
@slipher
Copy link
Member

slipher commented Jun 28, 2024

LGTM

@illwieckz illwieckz merged commit 5a0855e into master Jun 28, 2024
3 checks passed
@illwieckz illwieckz deleted the illwieckz/optimize branch June 28, 2024 13:36
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.

Make possible to not use fast math
2 participants