Martin Dørum 5 лет назад
Родитель
Сommit
d8b7920705
2 измененных файлов: 4 добавлений и 31 удалений
  1. 1
    0
      build.bb
  2. 3
    31
      src/toolchain.cc

+ 1
- 0
build.bb Просмотреть файл

target := bbbuild target := bbbuild
files := src files := src
warnings := all extra no-unused-parameter warnings := all extra no-unused-parameter
std := c++14

+ 3
- 31
src/toolchain.cc Просмотреть файл

} }


void getFlags(const BBVariables &vars, FileType type, std::vector<std::string> &flags) { 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"); auto pkgs = vars.find("pkgs");
} }
} }


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( std::vector<std::string> getDependencies(
const std::vector<std::string> &flags, const std::vector<std::string> &flags,
FileType type, FileType type,

Загрузка…
Отмена
Сохранить