You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
497 B

  1. % This file is part of Jiffy released under the MIT license.
  2. % See the LICENSE file for more information.
  3. %
  4. % Only run the EQC checks when EQC is present.
  5. HaveEQC = code:which(eqc) =/= non_existing,
  6. ErlOpts = if not HaveEQC -> []; true ->
  7. [{d, 'HAVE_EQC'}]
  8. end,
  9. case lists:keyfind(erl_opts, 1, CONFIG) of
  10. {erl_opts, Opts} ->
  11. NewOpts = {erl_opts, Opts ++ ErlOpts},
  12. lists:keyreplace(erl_opts, 1, CONFIG, NewOpts);
  13. false ->
  14. CONFIG ++ [{erl_opts, ErlOpts}]
  15. end.