Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Modularized bitsets #1049

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

Open
jvdp1 wants to merge 5 commits into fortran-lang:master
base: master
Choose a base branch
Loading
from jvdp1:modular_bitsets
Open

Modularized bitsets #1049

jvdp1 wants to merge 5 commits into fortran-lang:master from jvdp1:modular_bitsets

Conversation

@jvdp1
Copy link
Member

@jvdp1 jvdp1 commented Oct 24, 2025

Based on #1031, #1033

Here is a proposition to modularize stdlib_bitsets in cmake.
Furthermore, compiling stdlib_bitsets can be now set off with cmake

\cc: @eduardz1 @jalvesz @perazz

@jvdp1 jvdp1 requested review from jalvesz and perazz October 24, 2025 10:35
Copy link
Contributor

jalvesz commented Oct 24, 2025

I would have say to better rely on C-preprocessing and passing a flag definition -DWITH_BITSET instead of fypp prepreprocessing. That way the same source files can be processed by different compilers generating downstream different binaries with the appropriate flags.

Copy link
Member Author

jvdp1 commented Oct 24, 2025

I would have say to better rely on C-preprocessing and passing a flag definition -DWITH_BITSET instead of fypp prepreprocessing. That way the same source files can be processed by different compilers generating downstream different binaries with the appropriate flags.

I agree, but I could not find a backward-compatible approach with C-preprocessing.
To be backward-compatible, the user that does not provide a flag definition will compile the whole library.
With fypp, we can set the flag WITH_BITSET to true per default, and the user does not need to define the flag (except if the user does not want to compile the module bitsets).

However, with cpp, something like #ifdef _WITH_BITSETS will require that the user provides the flag to compile the module bitsets.
I though about the cpp directive #ifndef _WITHOUT_BITSETS, but I did not find it elegant and counter-intuitive.

Any other suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@perazz perazz Awaiting requested review from perazz

@jalvesz jalvesz Awaiting requested review from jalvesz

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /