fpm_command_line Module

Definition of the command line interface

This module uses M_CLI2 to define the command line interface. To define a command line interface create a new command settings type from the fpm_cmd_settings base class or the respective parent command settings.

The subcommand is selected by the first non-option argument in the command line. In the subcase block the actual command line is defined and transferred to an instance of the fpm_cmd_settings, the actual type is used by the fpm main program to determine which command entry point is chosen.

To add a new subcommand add a new case to select construct and specify the wanted command line and the expected default values. Some of the following points also apply if you add a new option or argument to an existing fpm subcommand. At this point you should create a help page for the new command in a simple catman-like format as well in the set_help procedure. Make sure to register new subcommands in the fpm-manual command by adding them to the manual character array and in the help/manual case as well. You should add the new command to the synopsis section of the fpm-list, fpm-help and fpm --list help pages below to make sure the help output is complete and consistent as well.



Contents


Derived Types

type, public, extends(fpm_cmd_settings) :: fpm_build_settings

Components

TypeVisibility AttributesNameInitial
character(len=:), public, allocatable:: build_name
character(len=:), public, allocatable:: compiler
character(len=:), public, allocatable:: flag
logical, public :: list =.false.
character(len=:), public, allocatable:: profile
logical, public :: show_model =.false.
logical, public :: verbose =.true.
character(len=:), public, allocatable:: working_dir

type, public, abstract :: fpm_cmd_settings

Components

TypeVisibility AttributesNameInitial
logical, public :: verbose =.true.
character(len=:), public, allocatable:: working_dir

type, public, extends(fpm_build_settings) :: fpm_install_settings

Components

TypeVisibility AttributesNameInitial
character(len=:), public, allocatable:: bindir
character(len=:), public, allocatable:: build_name
character(len=:), public, allocatable:: compiler
character(len=:), public, allocatable:: flag
character(len=:), public, allocatable:: includedir
character(len=:), public, allocatable:: libdir
logical, public :: list =.false.
logical, public :: no_rebuild
character(len=:), public, allocatable:: prefix
character(len=:), public, allocatable:: profile
logical, public :: show_model =.false.
logical, public :: verbose =.true.
character(len=:), public, allocatable:: working_dir

type, public, extends(fpm_cmd_settings) :: fpm_new_settings

Components

TypeVisibility AttributesNameInitial
logical, public :: backfill =.true.
character(len=:), public, allocatable:: name
logical, public :: verbose =.true.
logical, public :: with_bare =.false.
logical, public :: with_example =.false.
logical, public :: with_executable =.false.
logical, public :: with_full =.false.
logical, public :: with_lib =.true.
logical, public :: with_test =.false.
character(len=:), public, allocatable:: working_dir

type, public, extends(fpm_build_settings) :: fpm_run_settings

Components

TypeVisibility AttributesNameInitial
character(len=:), public, allocatable:: args
character(len=:), public, allocatable:: build_name
character(len=:), public, allocatable:: compiler
logical, public :: example
character(len=:), public, allocatable:: flag
logical, public :: list =.false.
character(len=ibug), public, allocatable:: name(:)
character(len=:), public, allocatable:: profile
character(len=:), public, allocatable:: runner
logical, public :: show_model =.false.
logical, public :: verbose =.true.
character(len=:), public, allocatable:: working_dir

type, public, extends(fpm_run_settings) :: fpm_test_settings

Components

TypeVisibility AttributesNameInitial
character(len=:), public, allocatable:: args
character(len=:), public, allocatable:: build_name
character(len=:), public, allocatable:: compiler
logical, public :: example
character(len=:), public, allocatable:: flag
logical, public :: list =.false.
character(len=ibug), public, allocatable:: name(:)
character(len=:), public, allocatable:: profile
character(len=:), public, allocatable:: runner
logical, public :: show_model =.false.
logical, public :: verbose =.true.
character(len=:), public, allocatable:: working_dir

type, public, extends(fpm_cmd_settings) :: fpm_update_settings

Settings for interacting and updating with project dependencies

Components

TypeVisibility AttributesNameInitial
logical, public :: clean
logical, public :: fetch_only
character(len=ibug), public, allocatable:: name(:)
logical, public :: verbose =.true.
character(len=:), public, allocatable:: working_dir

Subroutines

public subroutine get_command_line_settings(cmd_settings)

! canon_path is not converting “.”, etc. & ‘ unknown help topic “’//trim(unnamed(i)).’not found in:’,manual]

Arguments

Type IntentOptional AttributesName
class(fpm_cmd_settings), intent(out), allocatable:: cmd_settings