Bs script now uses env variables BS_SCRIPT_TYPE and BS_SCRIPT_TESTS
This commit is contained in:
parent
2a4d2feed2
commit
fe08489408
@ -8,7 +8,7 @@ struct Libregexis024BuildSystem {
|
|||||||
|
|
||||||
/* "debug" or "release" */
|
/* "debug" or "release" */
|
||||||
std::string build_type;
|
std::string build_type;
|
||||||
bool build_tests = false;
|
bool build_tests;
|
||||||
|
|
||||||
std::vector<std::string> warning_flags = {"-Wall", "-Wno-unused-variable", "-Werror=return-type","-pedantic",
|
std::vector<std::string> warning_flags = {"-Wall", "-Wno-unused-variable", "-Werror=return-type","-pedantic",
|
||||||
"-Wno-unused-but-set-variable", "-Wno-reorder"};
|
"-Wno-unused-but-set-variable", "-Wno-reorder"};
|
||||||
@ -33,8 +33,8 @@ struct Libregexis024BuildSystem {
|
|||||||
return my_flag_collection;
|
return my_flag_collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
Libregexis024BuildSystem(const std::string& build_type, const NormalCBuildSystemCommandMeaning& cmd)
|
Libregexis024BuildSystem(const std::string& build_type, bool build_tests, const NormalCBuildSystemCommandMeaning& cmd)
|
||||||
:build_type(build_type)
|
:build_type(build_type), build_tests(build_tests)
|
||||||
{
|
{
|
||||||
ASSERT(build_type == "release" || build_type == "debug", "Unknown build type");
|
ASSERT(build_type == "release" || build_type == "debug", "Unknown build type");
|
||||||
|
|
||||||
@ -140,7 +140,9 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
NormalCBuildSystemCommandMeaning cmd;
|
NormalCBuildSystemCommandMeaning cmd;
|
||||||
regular_bs_cli_cmd_interpret(args, cmd);
|
regular_bs_cli_cmd_interpret(args, cmd);
|
||||||
Libregexis024BuildSystem bs("release", cmd);
|
const char* BS_SCRIPT_TYPE = getenv("BS_SCRIPT_TYPE");
|
||||||
|
const char* BS_SCRIPT_TESTS = getenv("BS_SCRIPT_TESTS");
|
||||||
|
Libregexis024BuildSystem bs(BS_SCRIPT_TYPE ? BS_SCRIPT_TYPE : "release", (bool)BS_SCRIPT_TESTS, cmd);
|
||||||
if (cmd.need_to_build)
|
if (cmd.need_to_build)
|
||||||
complete_tasks_of_build_units(bs.runlevel_1);
|
complete_tasks_of_build_units(bs.runlevel_1);
|
||||||
if (cmd.need_to_install)
|
if (cmd.need_to_install)
|
||||||
|
Loading…
Reference in New Issue
Block a user