Skip to content

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

Merged
illwieckz merged 2 commits intomasterfrom
illwieckz/optimize
Jun 28, 2024
Merged

cmake: rewrite the build options and the flag setting#51
illwieckz merged 2 commits intomasterfrom
illwieckz/optimize

Conversation

@illwieckz
Copy link
Copy Markdown
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 illwieckz force-pushed the illwieckz/optimize branch from 5cfbc69 to 1f983f7 Compare June 26, 2024 13:58
@illwieckz
Copy link
Copy Markdown
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.

@illwieckz illwieckz force-pushed the illwieckz/optimize branch from 1f983f7 to 9554fe0 Compare June 27, 2024 21:54
@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
Copy Markdown
Member

slipher commented Jun 28, 2024

LGTM

@illwieckz illwieckz merged commit 5a0855e into master Jun 28, 2024
@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