Skip to content

Commit

Permalink
Rename to config_file
Browse files Browse the repository at this point in the history
  • Loading branch information
minhqdao committed Jun 18, 2023
1 parent 607c95f commit 5409778
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions src/fpm_command_line.f90
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ subroutine get_command_line_settings(cmd_settings)
type(fpm_install_settings), allocatable :: install_settings
type(version_t) :: version
character(len=:), allocatable :: common_args, compiler_args, run_args, working_dir, &
& c_compiler, cxx_compiler, archiver, version_s, token_s, global_config
& c_compiler, cxx_compiler, archiver, version_s, token_s, config_file

character(len=*), parameter :: fc_env = "FC", cc_env = "CC", ar_env = "AR", &
& fflags_env = "FFLAGS", cflags_env = "CFLAGS", cxxflags_env = "CXXFLAGS", ldflags_env = "LDFLAGS", &
Expand Down Expand Up @@ -291,7 +291,7 @@ subroutine get_command_line_settings(cmd_settings)
call set_args(common_args // compiler_args // run_args //'&
& --all F &
& --example F &
& --global-config " " &
& --config-file " " &
& --',help_run,version_text)

call check_build_vals()
Expand Down Expand Up @@ -321,7 +321,7 @@ subroutine get_command_line_settings(cmd_settings)
c_compiler = sget('c-compiler')
cxx_compiler = sget('cxx-compiler')
archiver = sget('archiver')
global_config = sget('global-config')
config_file = sget('config-file')
allocate(fpm_run_settings :: cmd_settings)
val_runner=sget('runner')
if(specified('runner') .and. val_runner=='')val_runner='echo'
Expand All @@ -333,7 +333,7 @@ subroutine get_command_line_settings(cmd_settings)
& c_compiler=c_compiler, &
& cxx_compiler=cxx_compiler, &
& archiver=archiver, &
& path_to_config=global_config, &
& path_to_config=config_file, &
& flag=val_flag, &
& cflag=val_cflag, &
& cxxflag=val_cxxflag, &
Expand All @@ -350,15 +350,15 @@ subroutine get_command_line_settings(cmd_settings)
& --list F &
& --show-model F &
& --tests F &
& --global-config " " &
& --config-file " " &
& --',help_build,version_text)

call check_build_vals()

c_compiler = sget('c-compiler')
cxx_compiler = sget('cxx-compiler')
archiver = sget('archiver')
global_config = sget('global-config')
config_file = sget('config-file')

allocate( fpm_build_settings :: cmd_settings )
cmd_settings=fpm_build_settings( &
Expand All @@ -368,7 +368,7 @@ subroutine get_command_line_settings(cmd_settings)
& c_compiler=c_compiler, &
& cxx_compiler=cxx_compiler, &
& archiver=archiver, &
& path_to_config=global_config, &
& path_to_config=config_file, &
& flag=val_flag, &
& cflag=val_cflag, &
& cxxflag=val_cxxflag, &
Expand Down Expand Up @@ -513,15 +513,15 @@ subroutine get_command_line_settings(cmd_settings)
& --libdir "lib" &
& --bindir "bin" &
& --includedir "include" &
& --global-config " " &
& --config-file " " &
&', help_install, version_text)

call check_build_vals()

c_compiler = sget('c-compiler')
cxx_compiler = sget('cxx-compiler')
archiver = sget('archiver')
global_config = sget('global-config')
config_file = sget('config-file')
allocate(install_settings, source=fpm_install_settings(&
list=lget('list'), &
profile=val_profile,&
Expand All @@ -530,7 +530,7 @@ subroutine get_command_line_settings(cmd_settings)
c_compiler=c_compiler, &
cxx_compiler=cxx_compiler, &
archiver=archiver, &
path_to_config=global_config, &
path_to_config=config_file, &
flag=val_flag, &
cflag=val_cflag, &
cxxflag=val_cxxflag, &
Expand All @@ -556,7 +556,7 @@ subroutine get_command_line_settings(cmd_settings)

case('test')
call set_args(common_args // compiler_args // run_args // '&
& --global-config " " &
& --config-file " " &
& -- ', help_test,version_text)

call check_build_vals()
Expand All @@ -581,7 +581,7 @@ subroutine get_command_line_settings(cmd_settings)
c_compiler = sget('c-compiler')
cxx_compiler = sget('cxx-compiler')
archiver = sget('archiver')
global_config = sget('global-config')
config_file = sget('config-file')

allocate(fpm_test_settings :: cmd_settings)
val_runner=sget('runner')
Expand All @@ -594,7 +594,7 @@ subroutine get_command_line_settings(cmd_settings)
& c_compiler=c_compiler, &
& cxx_compiler=cxx_compiler, &
& archiver=archiver, &
& path_to_config=global_config, &
& path_to_config=config_file, &
& flag=val_flag, &
& cflag=val_cflag, &
& cxxflag=val_cxxflag, &
Expand All @@ -610,7 +610,7 @@ subroutine get_command_line_settings(cmd_settings)
call set_args(common_args // '&
& --fetch-only F &
& --clean F &
& --global-config " " &
& --config-file " " &
&', help_update, version_text)

if( size(unnamed) > 1 )then
Expand All @@ -619,23 +619,23 @@ subroutine get_command_line_settings(cmd_settings)
names=[character(len=len(names)) :: ]
endif

global_config = sget('global-config')
config_file = sget('config-file')

allocate(fpm_update_settings :: cmd_settings)
cmd_settings=fpm_update_settings(name=names, &
& fetch_only=lget('fetch-only'), &
& verbose=lget('verbose'), &
& path_to_config=global_config, &
& path_to_config=config_file, &
& clean=lget('clean'))

case('clean')
call set_args(common_args // '&
& --skip &
& --all &
& --global-config " " &
& --config-file " " &
&', help_clean, version_text)

global_config = sget('global-config')
config_file = sget('config-file')

allocate(fpm_clean_settings :: cmd_settings)
call get_current_directory(working_dir, error)
Expand All @@ -644,7 +644,7 @@ subroutine get_command_line_settings(cmd_settings)
& calling_dir=working_dir, &
& clean_skip=lget('skip'), &
& clean_call=lget('all'), &
& path_to_config=global_config &
& path_to_config=config_file &
&)

case('publish')
Expand All @@ -656,15 +656,15 @@ subroutine get_command_line_settings(cmd_settings)
& --list F &
& --show-model F &
& --tests F &
& --global-config " " &
& --config-file " " &
& --', help_publish, version_text)

call check_build_vals()

c_compiler = sget('c-compiler')
cxx_compiler = sget('cxx-compiler')
archiver = sget('archiver')
global_config = sget('global-config')
config_file = sget('config-file')
token_s = sget('token')

allocate(fpm_publish_settings :: cmd_settings)
Expand All @@ -685,7 +685,7 @@ subroutine get_command_line_settings(cmd_settings)
& list=lget('list'),&
& show_model=lget('show-model'),&
& build_tests=lget('tests'),&
& path_to_config=global_config, &
& path_to_config=config_file, &
& verbose=lget('verbose'),&
& token=token_s)

Expand Down Expand Up @@ -1324,7 +1324,7 @@ subroutine set_help()
'', &
'SYNOPSIS', &
' fpm update [--fetch-only] [--clean] [--verbose] [NAME(s)] ', &
' [--global-config PATH] ', &
' [--config-file PATH] ', &
'', &
'DESCRIPTION', &
' Manage and update project dependencies. If no dependency names are', &
Expand All @@ -1346,7 +1346,7 @@ subroutine set_help()
'SYNOPSIS', &
' fpm install [--profile PROF] [--flag FFLAGS] [--list] [--no-rebuild]', &
' [--prefix DIR] [--bindir DIR] [--libdir DIR] [--includedir DIR]', &
' [--verbose] [--global-config PATH]', &
' [--verbose] [--config-file PATH]', &
'', &
'DESCRIPTION', &
' Subcommand to install fpm projects. Running install will export the', &
Expand Down Expand Up @@ -1409,7 +1409,7 @@ subroutine set_help()
'', &
'SYNOPSIS', &
' fpm publish [--token TOKEN] [--show-package-version] [--show-upload-data]', &
' [--dry-run] [--verbose] [--global-config PATH]', &
' [--dry-run] [--verbose] [--config-file PATH]', &
'', &
' fpm publish --help|--version', &
'', &
Expand Down

0 comments on commit 5409778

Please sign in to comment.