-
Notifications
You must be signed in to change notification settings - Fork 112
feat: custom build folder #1173
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
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 support for custom build directories in the fpm (Fortran Package Manager) to allow users to specify different output locations for build artifacts. This enables parallel builds with different configurations without overwrites.
- Adds
--build-dir
command-line option andFPM_BUILD_DIR
environment variable support - Updates the fpm model to track and validate custom build directory paths
- Implements validation to prevent conflicts with reserved source directory names
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/fpm_model.f90 | Adds build_dir field to model type with serialization support |
src/fpm_command_line.f90 | Implements CLI parsing and validation for build directory option |
src/fpm_backend_output.f90 | Updates build progress tracking to use custom build directory |
src/fpm_backend.F90 | Passes build directory to progress initialization |
src/fpm/dependency.f90 | Updates dependency tree to use custom build directory |
src/fpm/cmd/update.f90 | Modifies update command to respect custom build directory |
src/fpm/cmd/export.f90 | Updates export command for custom build directory support |
src/fpm.f90 | Integrates build directory into main build model logic |
ci/test_custom_build_dir.sh | Comprehensive test suite for custom build directory functionality |
ci/run_tests.sh | Integrates custom build directory tests into CI pipeline |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This PR adds support for specifying a custom
build/
folder for build outputs in fpm. Users can now configure the build directory using either the--build-dir
command-line option or theFPM_BUILD_DIR
environment variable.So, builds with different CLI/environment features (i.e. compilers, etc.) can have their own folder, avoiding overwrites.
Example:
fpm build --build-dir build_gcc
fpm install --build-dir build_gcc --prefix=/gcc_packages/
Closes #1137.