command_mode Function

private pure function command_mode(settings) result(mode)

Derive a human-readable mode label from fpm settings.

The returned string is used only for banner presentation.

Arguments

Type IntentOptional Attributes Name
class(fpm_build_settings), intent(in) :: settings

Return Value character(len=:), allocatable


Called by

proc~~command_mode~~CalledByGraph proc~command_mode command_mode proc~print_banner print_banner proc~print_banner->proc~command_mode proc~rebuild_watch_list rebuild_watch_list proc~rebuild_watch_list->proc~print_banner proc~handle_manifest_change handle_manifest_change proc~handle_manifest_change->proc~rebuild_watch_list proc~watcher_init watcher_t%watcher_init proc~watcher_init->proc~rebuild_watch_list proc~watcher_run watcher_t%watcher_run proc~watcher_run->proc~rebuild_watch_list proc~watcher_run->proc~handle_manifest_change

Source Code

   pure function command_mode(settings) result(mode)
      class(fpm_build_settings), intent(in) :: settings
      character(len=:), allocatable :: mode
      select type (s => settings)
       type is (fpm_test_settings)
         mode = "test"
       type is (fpm_run_settings)
         if (s%example) then
            mode = "run --example"
         else
            mode = "run"
         end if
       class default
         mode = "build"
      end select
   end function command_mode