Browse Source

oops

rebrand
Martin Dørum 3 years ago
parent
commit
d8b7920705
2 changed files with 4 additions and 31 deletions
  1. 1
    0
      build.bb
  2. 3
    31
      src/toolchain.cc

+ 1
- 0
build.bb View File

@@ -1,3 +1,4 @@
target := bbbuild
files := src
warnings := all extra no-unused-parameter
std := c++14

+ 3
- 31
src/toolchain.cc View File

@@ -123,9 +123,9 @@ std::string targetFilePath(
}

void getFlags(const BBVariables &vars, FileType type, std::vector<std::string> &flags) {
auto std = vars.find("std");
if (std != vars.end() && std->second.size() > 0) {
flags.push_back("-std=" + std->second[1]);
auto stdver = vars.find("std");
if (stdver != vars.end() && stdver->second.size() > 0) {
flags.push_back("-std=" + stdver->second[0]);
}

auto pkgs = vars.find("pkgs");
@@ -215,34 +215,6 @@ void getLDFlags(const BBVariables &vars, std::vector<std::string> &flags) {
}
}

void getPkgConfigFlags(const std::vector<std::string> &pkgs, std::vector<std::string> &flags) {
std::vector<std::string> argv;
argv.push_back(getPkgConfig());
argv.push_back("--cflags");
for (auto &pkg: pkgs) {
argv.push_back(pkg);
}

// Execute $(PKG_CONFIG) --cflags $(PKGS)
std::string output;
sys::execute(argv, &output, global::verbose >= 2);
parseWhitespaceSeparated(output, flags);
}

void getPkgConfigLDLibs(const std::vector<std::string> &pkgs, std::vector<std::string> &flags) {
std::vector<std::string> argv;
argv.push_back(getPkgConfig());
argv.push_back("--libs");
for (auto &pkg: pkgs) {
argv.push_back(pkg);
}

// Execute $(PKG_CONFIG) --libs $(PKGS)
std::string output;
sys::execute(argv, &output, global::verbose >= 2);
parseWhitespaceSeparated(output, flags);
}

std::vector<std::string> getDependencies(
const std::vector<std::string> &flags,
FileType type,

Loading…
Cancel
Save