diff options
| author | ruki <[email protected]> | 2020-07-05 10:32:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-07-05 10:34:37 +0800 |
| commit | c14bfc6fa4e30b2a2af6cb7500bd7b7c16896472 (patch) | |
| tree | d5d682e10937cdebc6fa9285e1e2978a4f17ec21 /tests/projects | |
| parent | 22229713a006394d0bb5d70865850bad60898f00 (diff) | |
add fortran static library tests
Diffstat (limited to 'tests/projects')
| -rw-r--r-- | tests/projects/c++/console/xmake.lua | 9 | ||||
| -rw-r--r-- | tests/projects/c/console/xmake.lua | 10 | ||||
| -rw-r--r-- | tests/projects/fortran/static_library/src/main.f90 | 5 | ||||
| -rw-r--r-- | tests/projects/fortran/static_library/src/test.f90 | 8 | ||||
| -rw-r--r-- | tests/projects/fortran/static_library/xmake.lua | 11 |
5 files changed, 26 insertions, 17 deletions
diff --git a/tests/projects/c++/console/xmake.lua b/tests/projects/c++/console/xmake.lua index 9ab7f42ca..35b9bde70 100644 --- a/tests/projects/c++/console/xmake.lua +++ b/tests/projects/c++/console/xmake.lua @@ -1,12 +1,5 @@ --- add rules add_rules("mode.debug", "mode.release") - --- add target -target("console_c++") - - -- set kind +target("test") set_kind("binary") - - -- add files add_files("src/*.cpp") diff --git a/tests/projects/c/console/xmake.lua b/tests/projects/c/console/xmake.lua index 547d0f101..405285a8f 100644 --- a/tests/projects/c/console/xmake.lua +++ b/tests/projects/c/console/xmake.lua @@ -1,13 +1,5 @@ - --- add modes: debug and release add_rules("mode.debug", "mode.release") - --- add target -target("console_c") - - -- set kind +target("test") set_kind("binary") - - -- add files add_files("src/*.c") diff --git a/tests/projects/fortran/static_library/src/main.f90 b/tests/projects/fortran/static_library/src/main.f90 new file mode 100644 index 000000000..9adea3e26 --- /dev/null +++ b/tests/projects/fortran/static_library/src/main.f90 @@ -0,0 +1,5 @@ +program hello + use test, only: print_hello + implicit none (type, external) + call print_hello() +end program hello diff --git a/tests/projects/fortran/static_library/src/test.f90 b/tests/projects/fortran/static_library/src/test.f90 new file mode 100644 index 000000000..b1e97a36c --- /dev/null +++ b/tests/projects/fortran/static_library/src/test.f90 @@ -0,0 +1,8 @@ +module test + implicit none (type, external) + +contains + subroutine print_hello() + print *, "Hello World!" + end subroutine print_hello +end module test diff --git a/tests/projects/fortran/static_library/xmake.lua b/tests/projects/fortran/static_library/xmake.lua new file mode 100644 index 000000000..694755de5 --- /dev/null +++ b/tests/projects/fortran/static_library/xmake.lua @@ -0,0 +1,11 @@ +add_rules("mode.debug", "mode.release") + +target("testlib") + set_kind("static") + add_files("src/test.f90") + +target("test") + set_kind("binary") + add_deps("testlib") + add_files("src/main.f90") + |
