Skip to content

Commit

Permalink
Add TODOS about nob leaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
iglesias committed May 26, 2024
1 parent 5cde223 commit 781d0d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,22 @@ void make_and_run_cmd(std::array<Cstr, N> strings)
Cmd cmd;
cmd.line.count = strings.size();
cmd.line.elems = strings.data();
//TODO FIX leaks.
//TODO FIX cmd_show leak.
INFO("make_and_run_cmd: %s", cmd_show(cmd));
cmd_run_sync(cmd);
}

void build_cpp_file(std::string_view filename)
{
Cstr path = PATH(filename.data());
//TODO FIX NOEXT leak.
make_and_run_cmd(std::array{"g++", CPPFLAGS, "-o", NOEXT(path), path});
}

void build_and_run_gtest_file(std::string_view filename)
{
Cstr path = PATH(filename.data());
//TODO FIX NOEXT leak.
CMD("g++", CPPFLAGS, "-o", NOEXT(path), path, "-lgtest");
CMD(NOEXT(path));
}
Expand Down

0 comments on commit 781d0d1

Please sign in to comment.