build command
Build all programs found in the source tree, or a specific target.
bash
fobis build [options]How to use it, with examples: Building.
All options
| Option | Value | Default | Description |
|---|---|---|---|
--fobos, -f | TEXT | Specify a "fobos" file named differently from "fobos" | |
--fci | Assume fobos inputs as case insensitive | ||
--mode | TEXT | Select a mode defined into a fobos file | |
--lmodes | List the modes defined into a fobos file | ||
--shadow | TEXT | Rebuild the mode as a shadow (checks, sanitize or strict): the mode's settings with checking flags, in its own build directory (.fobis/shadow/<mode>-<shadow>/). | |
--compiler | TEXT | gnu | Compiler used (case insensitive, default gnu) |
--fc | TEXT | Fortran compiler statement (for --compiler custom) | |
--cflags | TEXT | Compile flags | |
--lflags | TEXT | Link flags | |
--cc | TEXT | C compiler for the .c sources (default: the compiler family's, e.g. gcc) | |
--c-cflags | TEXT | Compile flags of the .c sources (default -c) | |
--c-preproc | TEXT | Preprocessor flags of the .c sources | |
--modsw | TEXT | Module search path switch (for --compiler custom) | |
--mpi | Use MPI enabled version of compiler | ||
--openmp | Use OpenMP pragmas | ||
--openmp-offload | Use OpenMP Offload pragmas | ||
--coarray | Use coarrays | ||
--coverage | Instrument for coverage analysis | ||
--profile | Instrument for profiling analysis | ||
--mklib | TEXT | Build library instead of program (static|shared) | |
--ar | TEXT | ar | Archiver executable for static libraries [default: ar] |
--arflags | TEXT | -rcs | Archiver flags for static libraries [default: -rcs] |
--ranlib | TEXT | ranlib | Ranlib executable; empty string to skip [default: ranlib] |
--cflags-heritage, --ch | Store cflags for heritage checking; re-compile all if they change | ||
--track-build, --tb | Store build info for the install command | ||
--compile-commands, --no-compile-commands | Write the compilation database compile_commands.json in the build directory, linked from the project root (opt-in) | ||
--src, -s | TEXT | Root-directory of source files [default: ./] | |
--build-dir, --dbld | TEXT | Directory containing built objects [default: ./]; given here, it wins over the mode's build_dir | |
--obj-dir, --dobj | TEXT | ./obj/ | Directory containing compiled objects [default: ./obj/] |
--mod-dir, --dmod | TEXT | ./mod/ | Directory containing .mod files [default: ./mod/] |
--lib-dir, --dlib | TEXT | Directories searched for libraries | |
--include, -i | TEXT | Directories for searching included files | |
--exclude-dirs, --ed | TEXT | Exclude directories from the building process | |
--disable-recursive-search, --drs | Disable recursive search inside directories | ||
--target, -t | TEXT | Specify a target file [default: all programs found] | |
--output, -o | TEXT | Output file name (used with --target) | |
--exclude, -e | TEXT | Exclude files from the building process | |
--libs | TEXT | External libraries with full paths | |
--vlibs | TEXT | Volatile external libraries with full paths | |
--ext-libs | TEXT | External libraries in compiler path | |
--ext-vlibs | TEXT | Volatile external libraries in compiler path | |
--dependon | TEXT | Interdependent external fobos files for interdependent building | |
--inc | TEXT | Extensions for include files | |
--extensions | TEXT | Extensions of parsed files | |
--build-all | Build all sources parsed | ||
--preprocessor | TEXT | Preprocessor name for pre-processing sources (e.g. PreForM.py) | |
--preproc | TEXT | Preprocessor flags for the main compiler | |
--preprocessor-args, --app | TEXT | Preprocessor-specific flags | |
--preprocessor-no-o, --npp | Do not add -o in front of output in preprocessor command | ||
--preprocessor-dir, --dpp | TEXT | Directory for preprocessed files | |
--preprocessor-ext, --epp | TEXT | File extensions to preprocess | |
--force-compile | Force to (re-)compile all | ||
--colors | Activate colors in shell prints | ||
--log, -l | Activate log file creation | ||
--graph | Generate a dependencies graph via graphviz | ||
--quiet, -q | Less verbose output | ||
--verbose | Extremely verbose output for debugging | ||
--jobs, -j | INTEGER | 1 | Number of concurrent compilation jobs [default: 1] |
--makefile, -m | TEXT | Generate a GNU Makefile for building the project | |
--json | Emit structured JSON to stdout instead of human-readable output (useful for scripting / agents) | ||
--build-profile | TEXT | Named build profile: debug, release, asan, coverage | |
--features | TEXT | Comma- or space-separated feature flags to activate (defined in [features] section). Prefix with '-' to deactivate (e.g. 'prod,-coverage'). A mode may declare 'features = a b c' to set its own default set. | |
--no-default-features | Disable the default feature set defined in [features] default | ||
--varset | TEXT | Apply one or more [varset:NAME] sections' $variable bindings to the active mode. Comma- or space-separated; later varsets override earlier ones. Use to swap parameterized values (cluster paths, GPU arch, ...) without duplicating modes. | |
--pre-build | TEXT | Rule(s) to execute before compilation (defined in [rule-X] sections) | |
--post-build | TEXT | Rule(s) to execute after successful linking (defined in [rule-X] sections) | |
--no-auto-discover | Disable convention-based source directory auto-discovery | ||
--list-profiles | Print all known build profile flag sets and exit | ||
--examples | Also build [[example.*]] sections | ||
--explain | When the build fails, explain why: from the project's facts first, then with the LLM (cited cause and fix) for the first error they do not cover. | ||
--explain-context | Like --explain, but print what the model would receive instead of running it. | ||
--target-filter | TEXT | Build only the named target(s) from [[target.*]] sections (comma-separated) |