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



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


static bool startsWith(BBBParser &parser, const char *str) { static bool startsWith(BBBParser &parser, const char *str) {
for (size_t i = 0; str[i] != '\0'; ++i) { for (size_t i = 0; str[i] != '\0'; ++i) {
} }


void SourceFile::compile(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); toolchain::compile(compileFlags(), type_, dir_, name_, outDir);


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

+ 1
- 3
src/sys.cc View File

if (print) { if (print) {
std::string str; std::string str;
for (size_t i = 0; i < args.size(); ++i) { for (size_t i = 0; i < args.size(); ++i) {
if (i == 0) {
str += " ";
} else {
if (i != 0) {
str += " "; str += " ";
} }
str += args[i]; str += args[i];

Loading…
Cancel
Save