-
Notifications
You must be signed in to change notification settings - Fork 112
feat: full support for features
and profiles
#1181
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements comprehensive features and profiles support for FPM, enabling conditional compilation, platform-specific configurations, and dependency feature propagation. The implementation adds two major capabilities: features (named sets of conditional build configurations) and profiles (predefined combinations of features).
Key changes include:
- Complete feature system with platform/compiler targeting and conditional compilation
- Profile system for predefined feature combinations
- Dependency feature propagation and specification
- Command-line integration with
--features
and--profile
options
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/fpm_command_line.f90 | Adds --features CLI option parsing and validation |
src/fpm/manifest/profiles.f90 | Implements new profile configuration system |
src/fpm/manifest/feature_collection.f90 | Adds feature merging, validation, and duplicate checking |
test files | Updates and adds comprehensive test coverage |
example packages | Demonstrates feature and profile functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR implements comprehensive Features and Profiles support, enabling conditional compilation, platform-specific configurations, and dependency feature propagation.
Overview
This implementation adds two major capabilities to FPM:
Key Features
✅ Feature System
fpm
manifest, allowing full customization✅ Profile System
development = ["debug","with_blas"]
)debug
andrelease
profiles (backward compatible; can be overridden)--profile <name>
and--features <list>
command line options✅ Advanced Capabilities
feature.os
orfeature.compiler
orfeature.compiler.os
orfeature.os.compiler
syntax for fine-grained controlUsage Examples
Basic Feature Definition
CLI Usage
Enable specific features
Use a profile
Build with dependency features
Backward Compatibility
debug
andrelease
features and profilesTesting
This implementation provides a solid foundation for conditional compilation and advanced build configurations in FPM while maintaining full backward compatibility with existing projects.