-
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
@perazz, thanks for this PR. This should make the manifest cross-compiler and cross-plateform. Since I am working on both Linux and Windows, this feature has been desired for a long time 👏. |
I have thought about this although have not deployed that yet. Currently, a "collection" i.e. a series of platform/compiler versions, only applies to [gfortran.windows]
preprocess.cpp.macros = ["_WIN32","_WIN64"] |
That would be really cool. I look forward to it.
because I do not want to define |
Makes total sense and I think it deserves a separate PR as the current one is already huge enough. |
e994efc
to
db45d55
Compare
fd3525c
to
b587fdf
Compare
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.