This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
(test
|
||||
(name main)
|
||||
(libraries foo)
|
||||
(modules main))
|
||||
|
||||
(library
|
||||
(name foo)
|
||||
(modules foo)
|
||||
(c_names stub1 sub/stub2))
|
||||
|
||||
(include_subdirs unqualified)
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.1)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
external x : unit -> string = "dune_test_x"
|
||||
external y : unit -> string = "dune_test_y"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#include <caml/mlvalues.h>
|
||||
#include <caml/alloc.h>
|
||||
|
|
@ -0,0 +1 @@
|
|||
let () = print_endline (Foo.x () ^ Foo.y ())
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
Test with C stubs in sub-directories
|
||||
------------------------------------
|
||||
|
||||
$ dune runtest
|
||||
File "dune", line 9, characters 16-25:
|
||||
9 | (c_names stub1 sub/stub2))
|
||||
^^^^^^^^^
|
||||
Error: Relative part of stub is not necessary and should be removed. To
|
||||
include sources in subdirectories, use the (include_subdirs ...) stanza.
|
||||
[1]
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#include "include/dune_test.h"
|
||||
|
||||
CAMLprim value dune_test_x()
|
||||
{
|
||||
return caml_copy_string("Hello,");
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#include "../include/dune_test.h"
|
||||
|
||||
CAMLprim value dune_test_y()
|
||||
{
|
||||
return caml_copy_string(" world!");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue