| Type: Index | |||||
| Package: taywee-args; external/taywee-args.lmp | |||||
| Package: spdlog; external/spdlog.lmp | |||||
| Package: ms-third; external/ms-third.lmp |
| - 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: |
| Type: Library | |||||
| Name: args | |||||
| Include-Path: taywee-args/include |
| Type: Package | |||||
| Name: ms-third | |||||
| Namespace: ms | |||||
| Library: wil.lml |
| Type: Library | |||||
| Name: spdlog | |||||
| Include-Path: spdlog/include | |||||
| Preprocessor-Define: FMT_HEADER_ONLY=1 |
| Type: Package | |||||
| Name: spdlog | |||||
| Namespace: spdlog | |||||
| Library: spdlog.lml |
| Type: Package | |||||
| Name: taywee-args | |||||
| Namespace: taywee | |||||
| Library: args.lml |
| Type: Library | |||||
| Name: wil | |||||
| Include-Path: wil/include |
| 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 |
| 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}; |
| 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; |
| #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 { | ||||
| #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; |
| #define DDS_UTIL_HPP_INCLUDED | #define DDS_UTIL_HPP_INCLUDED | ||||
| #include <algorithm> | #include <algorithm> | ||||
| #include <cctype> | |||||
| #include <filesystem> | #include <filesystem> | ||||
| #include <fstream> | #include <fstream> | ||||
| 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()), |
| 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) { |
| 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 |
| }; | }; | ||||
| 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); |