-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
test C program to check we can find the ocaml headers
1 parent
916bb9f
commit 0d88ba4
Showing
4 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
# Example commands to generate 'third-party/ocaml/BUCK.test'. | ||
# ``` | ||
# mkdir -p third-party/ocaml | ||
# python3 ~/project/ocaml-scripts/dromedary.py -s "$(basename $OPAM_SWITCH_PREFIX)" -o ~/project/ocaml-scripts/third-party/ocaml/BUCK.test | ||
# ``` | ||
|
||
_SUPPORTED = not host_info().os.is_windows | ||
|
||
# buildifier: disable=no-effect | ||
cxx_binary( | ||
name = "version", | ||
srcs = ["version.c"], | ||
deps = ["root//third-party/ocaml:ocaml-dev"], | ||
) if _SUPPORTED else None | ||
|
||
ocaml_binary( | ||
name = "test-unix", | ||
srcs = ["test_unix.ml"], | ||
name = "unix", | ||
srcs = ["unix.ml"], | ||
deps = ["root//third-party/ocaml:unix"], | ||
) if _SUPPORTED else None | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <stdio.h> | ||
|
||
#include <caml/version.h> | ||
|
||
char const* ocaml_version() { | ||
return OCAML_VERSION_STRING; | ||
} | ||
|
||
int main () { | ||
printf("The OCaml toolchain, version %s\n", ocaml_version()); | ||
|
||
return 0; | ||
} |