| @@ -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 | |||
| @@ -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: | |||
| @@ -0,0 +1,5 @@ | |||
| Type: Library | |||
| Name: args | |||
| Include-Path: taywee-args/include | |||
| @@ -0,0 +1,6 @@ | |||
| Type: Package | |||
| Name: ms-third | |||
| Namespace: ms | |||
| Library: wil.lml | |||
| @@ -0,0 +1,6 @@ | |||
| Type: Library | |||
| Name: spdlog | |||
| Include-Path: spdlog/include | |||
| Preprocessor-Define: FMT_HEADER_ONLY=1 | |||
| @@ -0,0 +1,6 @@ | |||
| Type: Package | |||
| Name: spdlog | |||
| Namespace: spdlog | |||
| Library: spdlog.lml | |||
| @@ -0,0 +1,6 @@ | |||
| Type: Package | |||
| Name: taywee-args | |||
| Namespace: taywee | |||
| Library: args.lml | |||
| @@ -0,0 +1,5 @@ | |||
| Type: Library | |||
| Name: wil | |||
| Include-Path: wil/include | |||
| @@ -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 | |||
| @@ -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}; | |||
| @@ -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; | |||
| @@ -2,8 +2,8 @@ | |||
| #define DDS_PROC_HPP_INCLUDED | |||
| #include <string> | |||
| #include <vector> | |||
| #include <string_view> | |||
| #include <vector> | |||
| namespace dds { | |||
| @@ -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; | |||
| @@ -2,6 +2,7 @@ | |||
| #define DDS_UTIL_HPP_INCLUDED | |||
| #include <algorithm> | |||
| #include <cctype> | |||
| #include <filesystem> | |||
| #include <fstream> | |||
| @@ -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()), | |||
| @@ -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) { | |||
| @@ -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 | |||
| @@ -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); | |||