Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,248 additions
and
411 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
open Base | ||
open Stdio | ||
|
||
let configure t = | ||
let module C = Configurator in | ||
let system_libtriangle = | ||
(* Test the presence of the header file. *) | ||
C.c_test t ~link_flags:["-ltriangle"] | ||
"#include <triangle.h> | ||
int main() { | ||
return 0; | ||
}" in | ||
let ccopt, cclib = | ||
if system_libtriangle then | ||
(* System with libtriangle *) | ||
["-DTRILIBRARY"; "-DEXTERNAL_TEST"; "-DLIBTRIANGLE"], | ||
["-ltriangle"] | ||
else | ||
["-DTRILIBRARY"; "-DEXTERNAL_TEST"], [] in | ||
let write_sexp file sexp = | ||
Out_channel.write_all file ~data:(Sexp.to_string sexp) in | ||
write_sexp "c_flags.sexp" (sexp_of_list sexp_of_string ccopt); | ||
write_sexp "c_library_flags.sexp" (sexp_of_list sexp_of_string cclib) | ||
|
||
let () = | ||
Configurator.main "discover" configure |
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,11 @@ | ||
(jbuild_version 1) | ||
|
||
(executable | ||
((name make_FC_code) | ||
(modules (make_FC_code)) | ||
(libraries (str)))) | ||
|
||
(executable | ||
((name discover) | ||
(modules (Discover)) | ||
(libraries (base stdio configurator)))) |
Oops, something went wrong.