aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpm/src/fpm/manifest.f9018
-rw-r--r--fpm/src/fpm_command_line.f9038
2 files changed, 17 insertions, 39 deletions
diff --git a/fpm/src/fpm/manifest.f90 b/fpm/src/fpm/manifest.f90
index af4e0fa..bf6343d 100644
--- a/fpm/src/fpm/manifest.f90
+++ b/fpm/src/fpm/manifest.f90
@@ -12,10 +12,11 @@ module fpm_manifest
use fpm_manifest_package, only : package_t, new_package
use fpm_error, only : error_t, fatal_error, file_not_found_error
use fpm_toml, only : toml_table, read_package_file
+ use fpm_manifest_test, only : test_t
implicit none
private
- public :: get_package_data, default_executable, default_library
+ public :: get_package_data, default_executable, default_library, default_test
public :: package_t
@@ -48,6 +49,21 @@ contains
end subroutine default_executable
+ !> Populate test in case we find the default test/ directory
+ subroutine default_test(self, name)
+
+ !> Instance of the executable meta data
+ type(test_t), intent(out) :: self
+
+ !> Name of the package
+ character(len=*), intent(in) :: name
+
+ self%name = name
+ self%source_dir = "test"
+ self%main = "main.f90"
+
+ end subroutine default_test
+
!> Obtain package meta data from a configuation file
subroutine get_package_data(package, file, error)
diff --git a/fpm/src/fpm_command_line.f90 b/fpm/src/fpm_command_line.f90
index 61fc9dc..d1714bf 100644
--- a/fpm/src/fpm_command_line.f90
+++ b/fpm/src/fpm_command_line.f90
@@ -182,7 +182,6 @@ contains
cmd_settings=fpm_build_settings( release=lget('release'),list=lget('list') )
case('new')
-<<<<<<< HEAD
help_text=[character(len=80) :: &
'NAME ', &
' new(1) - the fpm(1) subcommand to initialize a new project ', &
@@ -227,39 +226,6 @@ contains
' The fpm(1) home page is https://github.com/fortran-lang/fpm ', &
' ', &
' Registered packages are at https://fortran-lang.org/packages ', &
-=======
- help_text=[character(len=80) :: &
- 'NAME ', &
- ' new(1) - the fpm(1) subcommand to initialize a new project ', &
- 'SYNOPSIS ', &
- ' fpm new NAME [--with-executable] [--with-test] ', &
- ' ', &
- ' fpm new --help|--version ', &
- ' ', &
- 'DESCRIPTION ', &
- ' Create a new programming project in a new directory ', &
- ' ', &
- ' The "new" subcommand creates a directory and runs the command ', &
- ' "git init" in that directory and makes an example "fpm.toml" ', &
- ' file, a src/ directory, and optionally a test/ and app/ ', &
- ' directory with trivial example Fortran source files. ', &
- ' ', &
- ' Remember to update the information in the sample "fpm.toml" ', &
- ' file with such information as your name and e-mail address. ', &
- ' ', &
- 'EXAMPLES ', &
- ' Sample use ', &
- ' ', &
- ' # create new project directory and seed it ', &
- ' fpm new myproject ', &
- ' # Enter the new directory ', &
- ' cd myproject ', &
- ' # and run commands such as ', &
- ' fpm build ', &
- ' fpm run # if you selected --with-executable ', &
- ' fpm test # if you selected --with-test ', &
- ' ', &
->>>>>>> try one more like previous build to clear error
'' ]
call set_args(' --with-executable F --with-test F --lib F --app F --test F', help_text, version_text)
select case(size(unnamed))
@@ -443,11 +409,7 @@ contains
endif
help_text=[character(len=80) :: &
'USAGE: fpm [ SUBCOMMAND [SUBCOMMAND_OPTIONS] ] | [|--help|--version] ', &
-<<<<<<< HEAD
' Enter "fpm --help" for more information ', &
-=======
- ' Enter "fpm --help" for more information , &
->>>>>>> try one more like previous build to clear error
'' ]
write(stderr,'(g0)')(trim(help_text(i)), i=1, size(help_text) )
!!stop 3 ! causes github site tests to fail