瀏覽代碼

Use libman to import our embedded external dependencies

default_compile_flags
vector-of-bool 5 年之前
父節點
當前提交
0b0f005e02
共有 18 個檔案被更改,包括 65 行新增22 行删除
  1. +5
    -0
      INDEX.lmi
  2. +4
    -4
      azure-pipelines.yml
  3. +5
    -0
      external/args.lml
  4. +6
    -0
      external/ms-third.lmp
  5. +6
    -0
      external/spdlog.lml
  6. +6
    -0
      external/spdlog.lmp
  7. +6
    -0
      external/taywee-args.lmp
  8. +5
    -0
      external/wil.lml
  9. +3
    -4
      manifest.dds
  10. +3
    -1
      src/dds/compile.cpp
  11. +1
    -1
      src/dds/proc.common.cpp
  12. +1
    -1
      src/dds/proc.hpp
  13. +2
    -0
      src/dds/util.cpp
  14. +1
    -0
      src/dds/util.hpp
  15. +1
    -1
      src/libman/library.cpp
  16. +3
    -3
      src/libman/package.cpp
  17. +6
    -6
      src/libman/package.hpp
  18. +1
    -1
      src/libman/parse.hpp

+ 5
- 0
INDEX.lmi 查看文件

Type: Index

Package: taywee-args; external/taywee-args.lmp
Package: spdlog; external/spdlog.lmp
Package: ms-third; external/ms-third.lmp

+ 4
- 4
azure-pipelines.yml 查看文件

- script: | - script: |
echo Loading VS environment echo Loading VS environment
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\vsdevcmd" -arch=x64 || exit 1 call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\vsdevcmd" -arch=x64 || exit 1
python -u tools/test.py --exe _build/ddslim -T:msvc || exit 1
python -u tools/test.py --exe _build/ddslim.exe -T:msvc || exit 1
displayName: Smoke Tests displayName: Smoke Tests


- job: Windows_MSVC_VS2019 - job: Windows_MSVC_VS2019
- script: | - script: |
echo Loading VS environment echo Loading VS environment
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\vsdevcmd" -arch=x64 || exit 1 call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\vsdevcmd" -arch=x64 || exit 1
python -u tools/test.py --exe _build/ddslim -T:msvc || exit 1
python -u tools/test.py --exe _build/ddslim.exe -T:msvc || exit 1
displayName: Smoke Tests displayName: Smoke Tests


- job: Linux_GCC
- job: Linux_GCC8
pool: pool:
vmImage: ubuntu-18.04 vmImage: ubuntu-18.04
steps: steps:
- script: python3 -u tools/test.py --exe _build/ddslim -T:gcc-8 - script: python3 -u tools/test.py --exe _build/ddslim -T:gcc-8
displayName: Smoke Tests displayName: Smoke Tests


- job: macOS
- job: macOS_GCC8
pool: pool:
vmImage: macOS-10.14 vmImage: macOS-10.14
steps: steps:

+ 5
- 0
external/args.lml 查看文件

Type: Library

Name: args

Include-Path: taywee-args/include

+ 6
- 0
external/ms-third.lmp 查看文件

Type: Package

Name: ms-third
Namespace: ms

Library: wil.lml

+ 6
- 0
external/spdlog.lml 查看文件

Type: Library

Name: spdlog

Include-Path: spdlog/include
Preprocessor-Define: FMT_HEADER_ONLY=1

+ 6
- 0
external/spdlog.lmp 查看文件

Type: Package

Name: spdlog
Namespace: spdlog

Library: spdlog.lml

+ 6
- 0
external/taywee-args.lmp 查看文件

Type: Package

Name: taywee-args
Namespace: taywee

Library: args.lml

+ 5
- 0
external/wil.lml 查看文件

Type: Library

Name: wil

Include-Path: wil/include

+ 3
- 4
manifest.dds 查看文件

Private-Include: external/spdlog/include
Private-Include: external/wil/include
Private-Include: external/taywee-args/include
Private-Define: FMT_HEADER_ONLY=1
Uses: taywee/args
Uses: spdlog/spdlog
Uses: ms/wil

+ 3
- 1
src/dds/compile.cpp 查看文件

void file_compilation::compile(const toolchain& tc) const { void file_compilation::compile(const toolchain& tc) const {
fs::create_directories(obj.parent_path()); fs::create_directories(obj.parent_path());


spdlog::info("[{}] Compile file: {}", owner_name, fs::relative(file, rules.base_path()).string());
spdlog::info("[{}] Compile file: {}",
owner_name,
fs::relative(file, rules.base_path()).string());
auto start_time = std::chrono::steady_clock::now(); auto start_time = std::chrono::steady_clock::now();


compile_file_spec spec{file, obj}; compile_file_spec spec{file, obj};

+ 1
- 1
src/dds/proc.common.cpp 查看文件



bool dds::needs_quoting(std::string_view s) { bool dds::needs_quoting(std::string_view s) {
std::string_view okay_chars = "@%-+=:,./|_"; std::string_view okay_chars = "@%-+=:,./|_";
const bool all_okay = std::all_of(s.begin(), s.end(), [&](char c) {
const bool all_okay = std::all_of(s.begin(), s.end(), [&](char c) {
return std::isalnum(c) || (okay_chars.find(c) != okay_chars.npos); return std::isalnum(c) || (okay_chars.find(c) != okay_chars.npos);
}); });
return !all_okay; return !all_okay;

+ 1
- 1
src/dds/proc.hpp 查看文件

#define DDS_PROC_HPP_INCLUDED #define DDS_PROC_HPP_INCLUDED


#include <string> #include <string>
#include <vector>
#include <string_view> #include <string_view>
#include <vector>


namespace dds { namespace dds {



+ 2
- 0
src/dds/util.cpp 查看文件

#include <fstream> #include <fstream>
#include <sstream> #include <sstream>


using namespace dds;

std::fstream dds::open(const fs::path& filepath, std::ios::openmode mode, std::error_code& ec) { std::fstream dds::open(const fs::path& filepath, std::ios::openmode mode, std::error_code& ec) {
std::fstream ret; std::fstream ret;
auto mask = ret.exceptions() | std::ios::failbit; auto mask = ret.exceptions() | std::ios::failbit;

+ 1
- 0
src/dds/util.hpp 查看文件

#define DDS_UTIL_HPP_INCLUDED #define DDS_UTIL_HPP_INCLUDED


#include <algorithm> #include <algorithm>
#include <cctype>
#include <filesystem> #include <filesystem>
#include <fstream> #include <fstream>



+ 1
- 1
src/libman/library.cpp 查看文件

library library::from_file(path_ref fpath) { library library::from_file(path_ref fpath) {
auto pairs = parse_file(fpath); auto pairs = parse_file(fpath);


library ret;
library ret;


std::string _type_; std::string _type_;
read(fmt::format("Reading library manifest file '{}'", fpath.string()), read(fmt::format("Reading library manifest file '{}'", fpath.string()),

+ 3
- 3
src/libman/package.cpp 查看文件

package ret; package ret;
auto pairs = parse_file(fpath); auto pairs = parse_file(fpath);


std::string _type_;
std::vector<fs::path> libraries;
std::string _type_;
std::vector<fs::path> libraries;
read(fmt::format("Reading package file '{}'", fpath.string()), read(fmt::format("Reading package file '{}'", fpath.string()),
pairs, pairs,
read_required("Type", _type_), read_required("Type", _type_),
read_check_eq("Type", "Package"), read_check_eq("Type", "Package"),
read_required("Name", ret.name), read_required("Name", ret.name),
read_required("Namespace", ret.namespace_), read_required("Namespace", ret.namespace_),
read_accumulate("Requires", ret.requires),
read_accumulate("Requires", ret.requires_),
read_accumulate("Library", libraries)); read_accumulate("Library", libraries));


for (path_ref lib_path : libraries) { for (path_ref lib_path : libraries) {

+ 6
- 6
src/libman/package.hpp 查看文件



class package { class package {
public: public:
std::string name;
std::string namespace_;
std::vector<std::string> requires;
std::vector<library> libraries;
fs::path lmp_path;
std::string name;
std::string namespace_;
std::vector<std::string> requires_;
std::vector<library> libraries;
fs::path lmp_path;


static package from_file(path_ref);
static package from_file(path_ref);
}; };


} // namespace lm } // namespace lm

+ 1
- 1
src/libman/parse.hpp 查看文件

}; };


template <typename... Items> template <typename... Items>
auto read(std::string_view context[[maybe_unused]], const pair_list& pairs, Items... is) {
auto read(std::string_view context [[maybe_unused]], const pair_list& pairs, Items... is) {
std::vector<pair> bad_pairs; std::vector<pair> bad_pairs;
for (auto [key, value] : pairs.items()) { for (auto [key, value] : pairs.items()) {
auto nread = (is.read_one(context, key, value) + ... + 0); auto nread = (is.read_one(context, key, value) + ... + 0);

Loading…
取消
儲存