-
Notifications
You must be signed in to change notification settings - Fork 0
/
lakefile.lean
40 lines (33 loc) · 1.02 KB
/
lakefile.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import Lake
open Lake DSL
package algorithm where
leanOptions := #[
⟨`pp.unicode.fun, true⟩, -- pretty-prints `fun a ↦ b`
⟨`pp.proofs.withType, false⟩,
⟨`autoImplicit, false⟩,
⟨`relaxedAutoImplicit, false⟩
]
moreLinkArgs := #[
"-L./.lake/build/lib",
"-lstdc++"
]
require "leanprover-community" / "mathlib" @ git "master"
require "leanprover" / "doc-gen4" @ git "main"
lean_lib Mutable where
roots := #[`Mutable]
precompileModules := true
@[default_target]
lean_lib Algorithm where
roots := #[`Algorithm]
target ffi.o pkg : FilePath := do
let oFile := pkg.buildDir / "cpp" / "ffi.o"
let srcJob ← inputBinFile <| pkg.dir / "cpp" / "ffi.cpp"
let weakArgs := #["-I", (← getLeanIncludeDir).toString]
buildO oFile srcJob weakArgs #["-fPIC"] "clang++" getLeanTrace
extern_lib libleanffi pkg := do
let name := nameToStaticLib "leanffi"
let ffiO ← ffi.o.fetch
buildStaticLib (pkg.nativeLibDir / name) #[ffiO]
-- @[test_driver]
-- lean_exe test where
-- srcDir := "scripts"