Skip to content

Commit cb3337b

Browse files
authored
Merge pull request #377 from LKedward/include-dir
Add explicit include-dir key to manifest
2 parents 47c410e + 6743247 commit cb3337b

File tree

23 files changed

+211
-22
lines changed

23 files changed

+211
-22
lines changed

ci/run_tests.bat

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,28 @@ if errorlevel 1 exit 1
187187
%fpm_path% run --target gomp_test
188188
if errorlevel 1 exit 1
189189

190+
191+
cd ..\fortran_includes
192+
if errorlevel 1 exit 1
193+
194+
del /q /f build
195+
%fpm_path% build
196+
if errorlevel 1 exit 1
197+
198+
199+
cd ..\c_includes
200+
if errorlevel 1 exit 1
201+
202+
del /q /f build
203+
%fpm_path% build
204+
if errorlevel 1 exit 1
205+
206+
207+
cd ..\c_header_only
208+
if errorlevel 1 exit 1
209+
210+
del /q /f build
211+
%fpm_path% build
212+
if errorlevel 1 exit 1
213+
190214
cd ..\..

ci/run_tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,14 @@ cd ../link_executable
8989
"${f_fpm_path}" build
9090
"${f_fpm_path}" run --target gomp_test
9191

92+
cd ../fortran_includes
93+
"${f_fpm_path}" build
94+
95+
cd ../c_includes
96+
"${f_fpm_path}" build
97+
98+
cd ../c_header_only
99+
"${f_fpm_path}" build
100+
92101
# Cleanup
93102
rm -rf ./*/build

example_packages/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ the features demonstrated in each package and which versions of fpm are supporte
77
| Name | Features | Bootstrap (Haskell) fpm | fpm |
88
|---------------------|---------------------------------------------------------------|:-----------------------:|:---:|
99
| auto_discovery_off | Default layout with auto-discovery disabled | N | Y |
10+
| c_header_only | C header-only library | N | Y |
11+
| c_includes | C library with c include directory and dependency includes | N | Y |
1012
| circular_example | Local path dependency; circular dependency | Y | Y |
1113
| circular_test | Local path dependency; circular dependency | Y | Y |
14+
| fortran_includes | Fortran library with explicit include directory | Y | N |
1215
| hello_complex | Non-standard directory layout; multiple tests and executables | Y | Y |
1316
| hello_complex_2 | Auto-discovery of tests and executables with modules | N | Y |
1417
| hello_fpm | App-only; local path dependency | Y | Y |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/*
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name = "c_header_only"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int printf ( const char * format, ... );
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/*

example_packages/c_includes/fpm.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name = "c_includes"
2+
3+
[dependencies]
4+
c_header_only = { path = "../c_header_only"}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Include from "c_header_only" dependency
2+
#include "c_header.h"
3+
4+
int test(const int a);

example_packages/c_includes/src/lib.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "lib.h"
2+
3+
int test(const int a){
4+
5+
return printf("input: %d\n", a);
6+
7+
}

0 commit comments

Comments
 (0)