fpm_manifest_platform Module

Platform configuration type.

This type captures only the target compiler and operating-system selector, and implements the standard serialization interface (serializable_t) used across FPM manifest classes.

TOML representation: compiler = “” # e.g., “gfortran”, “ifx”, “all” os = “” # e.g., “linux”, “macos”, “windows”, “all”



Interfaces

public interface platform_config_t

  • private function new_platform(compiler, os_type)

    Initialize a new platform config from compiler name Automatically selects correct Intel compiler version based on OS

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: compiler
    integer, intent(in) :: os_type

    Return Value type(platform_config_t)

  • private function new_platform_id(compiler_id, os_type)

    Initialize a new platform config from compiler enum ID
    Automatically selects correct Intel compiler version based on OS

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=compiler_enum), intent(in) :: compiler_id
    integer, intent(in) :: os_type

    Return Value type(platform_config_t)


Derived Types

type, public, extends(serializable_t) ::  platform_config_t

Serializable platform configuration (compiler + OS only)

Components

Type Visibility Attributes Name Initial
integer(kind=compiler_enum), public :: compiler = id_all
integer, public :: os_type = OS_ALL

Constructor

private function new_platform (compiler, os_type)

Initialize a new platform config from compiler name Automatically selects correct Intel compiler version based on OS

private function new_platform_id (compiler_id, os_type)

Initialize a new platform config from compiler enum ID
Automatically selects correct Intel compiler version based on OS

Type-Bound Procedures

procedure, public, non_overridable :: any_compiler

Properties

procedure, public, non_overridable :: any_os
procedure, public, non_overridable :: any_platform
procedure, public :: compiler_name => platform_compiler_name

Get compiler name as string

generic, public :: dump => dump_to_toml, dump_to_file, dump_to_unit
procedure, public :: dump_to_toml
procedure, public :: info

Print information

procedure, public :: is_valid => platform_is_valid

Validation

generic, public :: load => load_from_toml, load_from_file, load_from_unit
procedure, public :: load_from_toml
procedure, public :: matches => platform_is_suitable

Return .true. if THIS platform selector is compatible with CURRENT (wildcards allowed)

procedure, public :: name => platform_config_name

Get configuration name as it appears in the manifest

generic, public :: operator(==) => serializable_is_same
procedure, public :: os_name => platform_os_name

Get OS name as string

procedure, public :: serializable_is_same => platform_is_same
procedure, public, non_overridable :: test_serialization

Test load/write roundtrip


Functions

public elemental function is_platform_key(key)

Check if a key (os or compiler) can be used for platform setting

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: key

Return Value logical