forked from paulgray/exml
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from esl/compile-driver-using-pc
Compile driver using pc plugin
- Loading branch information
Showing
3 changed files
with
53 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,52 @@ | ||
%% Stop rebar2 from building the shared objects | ||
%% (empty lists on 3rd and 4th positions work this way - why? no idea)... | ||
{port_specs, [{".*", "priv/exml_nif.so", [], []}]}. | ||
%% ...but build the shared objects "manually" by calling make. | ||
%% This also works with rebar3, which doesn't build .so libs by itself. | ||
{pre_hooks, | ||
[{"(linux|darwin|solaris)", compile, "make -C c_src"}, | ||
{"(freebsd)", compile, "gmake -C c_src"}]}. | ||
{post_hooks, | ||
[{"(linux|darwin|solaris)", clean, "make -C c_src clean"}, | ||
{"(freebsd)", clean, "gmake -C c_src clean"}]}. | ||
|
||
{profiles, | ||
[{test, | ||
[{deps, [{proper, "1.3.0"}]}] | ||
}]}. | ||
|
||
{plugins , [coveralls, | ||
{rebar3_codecov, | ||
{git, "https://github.com/zofpolkowska/rebar3_codecov.git", | ||
{ref, "3d0af19"}}} | ||
]}. | ||
|
||
{cover_enabled , true}. | ||
{cover_export_enabled , true}. | ||
{coveralls_coverdata , "_build/test/cover/eunit.coverdata"}. | ||
{coveralls_service_name , "travis-ci"}. | ||
[ | ||
{test, | ||
[ | ||
{deps, [{proper, "1.3.0"}]}, | ||
{plugins, | ||
[ | ||
pc, | ||
coveralls, | ||
{rebar3_codecov, | ||
{git, | ||
"https://github.com/zofpolkowska/rebar3_codecov.git", | ||
{ref, "3d0af19"}}} | ||
]} | ||
]} | ||
]}. | ||
|
||
{plugins, [pc]}. | ||
|
||
% Interrupt compilation, if the artifact is not found | ||
{artifacts, ["priv/exml_nif.so"]}. | ||
|
||
{port_specs, | ||
[ | ||
{ | ||
% Any arch | ||
".*", | ||
|
||
% Create library | ||
"priv/exml_nif.so", | ||
|
||
% From files | ||
["c_src/*.cpp"], | ||
|
||
% Using options | ||
[ {env, [{ "CXXFLAGS", "$CXXFLAGS -std=c++11" }]} ] | ||
} | ||
]}. | ||
|
||
{provider_hooks, | ||
[ | ||
{post, | ||
[ | ||
{compile, {pc, compile}}, | ||
{clean, {pc, clean}} | ||
]} | ||
]}. | ||
|
||
{cover_enabled, true}. | ||
{cover_export_enabled, true}. | ||
{coveralls_coverdata, "_build/test/cover/eunit.coverdata"}. | ||
{coveralls_service_name, "travis-ci"}. |