Browse Source

change logging a bit

feature/dependency-graph
Martin Dørum 4 years ago
parent
commit
1aa20b24d7
2 changed files with 6 additions and 4 deletions
  1. 5
    1
      src/SourceFile.cc
  2. 1
    3
      src/sys.cc

+ 5
- 1
src/SourceFile.cc View File

@@ -7,6 +7,7 @@

#include "toolchain.h"
#include "logger.h"
#include "globals.h"

static bool startsWith(BBBParser &parser, const char *str) {
for (size_t i = 0; str[i] != '\0'; ++i) {
@@ -165,7 +166,10 @@ bool SourceFile::needsRecompile(const std::string &outDir) const {
}

void SourceFile::compile(const std::string &outDir) const {
logger::log("Compile " + objectPath(outDir));
if (global::verbose == 0) {
logger::log("Compile " + objectPath(outDir));
}

toolchain::compile(compileFlags(), type_, dir_, name_, outDir);

// Nothing will need compile flags after it's compiled, so no reason to

+ 1
- 3
src/sys.cc View File

@@ -54,9 +54,7 @@ void execute(std::vector<const char *> &args, std::string *output, bool print) {
if (print) {
std::string str;
for (size_t i = 0; i < args.size(); ++i) {
if (i == 0) {
str += " ";
} else {
if (i != 0) {
str += " ";
}
str += args[i];

Loading…
Cancel
Save