Skip to content

Commit 0690da5

Browse files
committed
Support configuring compile flags using Elixir config
1 parent 5b9891b commit 0690da5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ You can enable certain features by doing the following:
7474
export EXQLITE_SYSTEM_CFLAGS=-DSQLITE_ENABLE_DBSTAT_VTAB=1
7575
```
7676

77+
Or you can pass extra environment variables using the Elixir config:
78+
79+
```elixir
80+
config :exqlite,
81+
force_build: true,
82+
make_env: %{
83+
"EXQLITE_SYSTEM_CFLAGS" => "-DSQLITE_ENABLE_DBSTAT_VTAB=1",
84+
"V" => "1"
85+
}
86+
```
87+
7788
### Listing Flags Used For Compilation
7889

7990
If you `export V=1` the flags used for compilation will be output to stdout.

mix.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ defmodule Exqlite.MixProject do
2121
versions: ["2.15", "2.16", "2.17"],
2222
availability: &target_available_for_nif_version?/2
2323
],
24+
make_env: Application.get_env(:exqlite, :make_env, %{}),
2425
cc_precompiler: cc_precompiler(),
2526
start_permanent: Mix.env() == :prod,
2627
aliases: aliases(),

0 commit comments

Comments
 (0)