nitc :: ToolContext :: find_nitc
nitc
compiler to useIf not nitc
is suitable, then prints an error and quit.
# Search the `nitc` compiler to use
#
# If not `nitc` is suitable, then prints an error and quit.
fun find_nitc: String
do
var nitc = opt_nitc.value
if nitc != null then
if not nitc.file_exists then
fatal_error(null, "error: cannot find `{nitc}` given by --nitc.")
abort
end
return nitc
end
nitc = "NITC".environ
if nitc != "" then
if not nitc.file_exists then
fatal_error(null, "error: cannot find `{nitc}` given by NITC.")
abort
end
return nitc
end
var nit_dir = nit_dir or else "."
nitc = nit_dir / "bin/nitc"
if not nitc.file_exists then
fatal_error(null, "Error: cannot find nitc. Set envvar NIT_DIR or NITC or use the --nitc option.")
abort
end
return nitc
end
src/testing/testing_base.nit:44,2--74,4