Selaa lähdekoodia

Use libman to import our embedded external dependencies

default_compile_flags
vector-of-bool 5 vuotta sitten
vanhempi
commit
0b0f005e02
18 muutettua tiedostoa jossa 65 lisäystä ja 22 poistoa
  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 Näytä tiedosto

@@ -0,0 +1,5 @@
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 Näytä tiedosto

@@ -16,7 +16,7 @@ jobs:
- script: |
echo Loading VS environment
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

- job: Windows_MSVC_VS2019
@@ -34,10 +34,10 @@ jobs:
- script: |
echo Loading VS environment
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

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

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

+ 5
- 0
external/args.lml Näytä tiedosto

@@ -0,0 +1,5 @@
Type: Library

Name: args

Include-Path: taywee-args/include

+ 6
- 0
external/ms-third.lmp Näytä tiedosto

@@ -0,0 +1,6 @@
Type: Package

Name: ms-third
Namespace: ms

Library: wil.lml

+ 6
- 0
external/spdlog.lml Näytä tiedosto

@@ -0,0 +1,6 @@
Type: Library

Name: spdlog

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

+ 6
- 0
external/spdlog.lmp Näytä tiedosto

@@ -0,0 +1,6 @@
Type: Package

Name: spdlog
Namespace: spdlog

Library: spdlog.lml

+ 6
- 0
external/taywee-args.lmp Näytä tiedosto

@@ -0,0 +1,6 @@
Type: Package

Name: taywee-args
Namespace: taywee

Library: args.lml

+ 5
- 0
external/wil.lml Näytä tiedosto

@@ -0,0 +1,5 @@
Type: Library

Name: wil

Include-Path: wil/include

+ 3
- 4
manifest.dds Näytä tiedosto

@@ -1,4 +1,3 @@
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 Näytä tiedosto

@@ -14,7 +14,9 @@ using namespace dds;
void file_compilation::compile(const toolchain& tc) const {
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();

compile_file_spec spec{file, obj};

+ 1
- 1
src/dds/proc.common.cpp Näytä tiedosto

@@ -10,7 +10,7 @@ using namespace dds;

bool dds::needs_quoting(std::string_view s) {
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 !all_okay;

+ 1
- 1
src/dds/proc.hpp Näytä tiedosto

@@ -2,8 +2,8 @@
#define DDS_PROC_HPP_INCLUDED

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

namespace dds {


+ 2
- 0
src/dds/util.cpp Näytä tiedosto

@@ -4,6 +4,8 @@
#include <fstream>
#include <sstream>

using namespace dds;

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

+ 1
- 0
src/dds/util.hpp Näytä tiedosto

@@ -2,6 +2,7 @@
#define DDS_UTIL_HPP_INCLUDED

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


+ 1
- 1
src/libman/library.cpp Näytä tiedosto

@@ -9,7 +9,7 @@ using namespace lm;
library library::from_file(path_ref fpath) {
auto pairs = parse_file(fpath);

library ret;
library ret;

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

+ 3
- 3
src/libman/package.cpp Näytä tiedosto

@@ -9,15 +9,15 @@ package package::from_file(path_ref fpath) {
package ret;
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()),
pairs,
read_required("Type", _type_),
read_check_eq("Type", "Package"),
read_required("Name", ret.name),
read_required("Namespace", ret.namespace_),
read_accumulate("Requires", ret.requires),
read_accumulate("Requires", ret.requires_),
read_accumulate("Library", libraries));

for (path_ref lib_path : libraries) {

+ 6
- 6
src/libman/package.hpp Näytä tiedosto

@@ -7,13 +7,13 @@ namespace lm {

class package {
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

+ 1
- 1
src/libman/parse.hpp Näytä tiedosto

@@ -226,7 +226,7 @@ public:
};

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;
for (auto [key, value] : pairs.items()) {
auto nread = (is.read_one(context, key, value) + ... + 0);

Loading…
Peruuta
Tallenna