Skip to content

feat: default profile support - #1244

Merged
perazz merged 4 commits into
fortran-lang:mainfrom
perazz:feature/default-profile
Feb 17, 2026
Merged

feat: default profile support#1244
perazz merged 4 commits into
fortran-lang:mainfrom
perazz:feature/default-profile

Conversation

@perazz

@perazz perazz commented Feb 16, 2026

Copy link
Copy Markdown
Member
  • Add support for a "default" profile whose features are automatically applied alongside the debug and release profiles
  • Default profile features are not applied when a custom profile or explicit --features are requested

This allows users to define baseline features (e.g. platform-specific flags) that are always included with standard debug/release builds:

[features]
baseline.flags = "-fPIC"
debug.flags = "-g"
release.flags = "-O3"

[profiles]
default = ["baseline"]
debug = ["debug"]
release = ["release"]

Behavior

Command Features applied
fpm build default + debug (fallback)
fpm build --profile debug default + debug
fpm build --profile release default + release
fpm build --profile myprofile myprofile only
fpm build --features "f1,f2" f1 + f2 only

Remove the unused `default` logical flag from feature_config_t.
Add support for a "default" profile whose features are automatically
applied alongside the debug and release profiles, but not when a
custom profile or explicit features are requested.
- default-profile-with-debug: default features applied with --profile debug
- default-profile-with-release: default features applied with --profile release
- default-profile-implicit-debug: default features applied with no explicit profile
- default-profile-skipped-custom: default features NOT applied with custom profile
Add example package demonstrating the default profile behavior:
- default profile features applied with debug/release profiles
- default profile features skipped with custom profiles
- default profile features applied with no explicit profile

Add integration tests in ci/test_features.sh.
@perazz perazz changed the title feat: add default profile support feat: default profile support Feb 17, 2026
@perazz
perazz merged commit 0ca8a4f into fortran-lang:main Feb 17, 2026
32 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.

1 participant