Browse Source

Formatting, and prune unused #includes

default_compile_flags
vector-of-bool 5 years ago
parent
commit
ae3f902581
25 changed files with 11 additions and 94 deletions
  1. +0
    -20
      src/dds/build.cpp
  2. +0
    -3
      src/dds/build.hpp
  3. +0
    -1
      src/dds/build/archive.cpp
  4. +0
    -17
      src/dds/build/archive.hpp
  5. +0
    -14
      src/dds/build/executable.hpp
  6. +1
    -3
      src/dds/build/plan/compile_file.cpp
  7. +0
    -1
      src/dds/build/plan/exe.cpp
  8. +1
    -2
      src/dds/build/plan/exe.hpp
  9. +3
    -6
      src/dds/build/plan/full.cpp
  10. +0
    -5
      src/dds/build/plan/full.hpp
  11. +0
    -1
      src/dds/build/plan/library.cpp
  12. +0
    -1
      src/dds/build/plan/library.hpp
  13. +1
    -1
      src/dds/build/plan/package.hpp
  14. +0
    -3
      src/dds/compdb.cpp
  15. +2
    -4
      src/dds/dds.main.cpp
  16. +1
    -1
      src/dds/deps.cpp
  17. +0
    -1
      src/dds/library.hpp
  18. +0
    -1
      src/dds/proc.common.cpp
  19. +0
    -3
      src/dds/repo/repo.cpp
  20. +0
    -1
      src/dds/repo/repo.hpp
  21. +0
    -1
      src/dds/sdist.cpp
  22. +0
    -2
      src/dds/source.cpp
  23. +0
    -1
      src/dds/source.hpp
  24. +1
    -0
      src/dds/toolchain/toolchain.hpp
  25. +1
    -1
      src/libman/parse.hpp

+ 0
- 20
src/dds/build.cpp View File

@@ -1,36 +1,16 @@
#include "./build.hpp"

#include <dds/build/plan/compile_file.hpp>
#include <dds/compdb.hpp>
#include <dds/logging.hpp>
#include <dds/proc.hpp>
#include <dds/source.hpp>
#include <dds/toolchain/toolchain.hpp>
#include <dds/usage_reqs.hpp>
#include <dds/util/algo.hpp>
#include <dds/util/string.hpp>
#include <libman/index.hpp>
#include <libman/parse.hpp>

#include <range/v3/range/conversion.hpp>
#include <range/v3/view/drop.hpp>
#include <range/v3/view/filter.hpp>
#include <range/v3/view/transform.hpp>

#include <algorithm>
#include <chrono>
#include <iomanip>
#include <iostream>
#include <mutex>
#include <sstream>
#include <stdexcept>
#include <thread>

using namespace dds;

using namespace ranges;
using namespace ranges::views;

namespace {

struct archive_failure : std::runtime_error {

+ 0
- 3
src/dds/build.hpp View File

@@ -2,9 +2,6 @@

#include <dds/build/params.hpp>
#include <dds/package_manifest.hpp>
#include <dds/util/fs.hpp>

#include <optional>

namespace dds {


+ 0
- 1
src/dds/build/archive.cpp View File

@@ -1 +0,0 @@
#include "./archive.hpp"

+ 0
- 17
src/dds/build/archive.hpp View File

@@ -1,17 +0,0 @@
#pragma once

#include <dds/toolchain/toolchain.hpp>
#include <dds/util/fs.hpp>

#include <vector>

namespace dds {

struct archive_rules {
std::vector<fs::path> objects;
fs::path out;

void create_archive(const toolchain& tc) const;
};

} // namespace dds

+ 0
- 14
src/dds/build/executable.hpp View File

@@ -1,14 +0,0 @@
#pragma once

#include <dds/util/fs.hpp>

#include <vector>

namespace dds {

class link_executable_rules {
std::vector<fs::path> inputs;
fs::path output;
};

} // namespace dds

+ 1
- 3
src/dds/build/plan/compile_file.cpp View File

@@ -6,9 +6,7 @@

#include <spdlog/spdlog.h>

#include <atomic>
#include <mutex>
#include <thread>
#include <string>
#include <vector>

using namespace dds;

+ 0
- 1
src/dds/build/plan/exe.cpp View File

@@ -6,7 +6,6 @@
#include <spdlog/spdlog.h>

#include <algorithm>
#include <cassert>
#include <chrono>

using namespace dds;

+ 1
- 2
src/dds/build/plan/exe.hpp View File

@@ -3,8 +3,7 @@
#include <dds/build/plan/compile_file.hpp>
#include <dds/util/fs.hpp>

#include <set>
#include <tuple>
#include <string>
#include <vector>

namespace dds {

+ 3
- 6
src/dds/build/plan/full.cpp View File

@@ -1,19 +1,14 @@
#include "./full.hpp"

#include <dds/build/iter_compilations.hpp>
#include <dds/proc.hpp>

#include <range/v3/action/join.hpp>
#include <range/v3/view/concat.hpp>
#include <range/v3/view/filter.hpp>
#include <range/v3/view/join.hpp>
#include <range/v3/view/repeat_n.hpp>
#include <range/v3/view/transform.hpp>
#include <range/v3/view/zip.hpp>

#include <spdlog/spdlog.h>

#include <chrono>
#include <mutex>
#include <thread>

@@ -96,7 +91,9 @@ void build_plan::archive_all(const build_env& env, int njobs) const {
}

void build_plan::link_all(const build_env& env, int njobs) const {
std::vector<std::pair<std::reference_wrapper<const library_plan>, std::reference_wrapper<const link_executable_plan>>> executables;
std::vector<std::pair<std::reference_wrapper<const library_plan>,
std::reference_wrapper<const link_executable_plan>>>
executables;

for (auto&& lib : iter_libraries(*this)) {
for (auto&& exe : lib.executables()) {

+ 0
- 5
src/dds/build/plan/full.hpp View File

@@ -1,12 +1,7 @@
#pragma once

#include <dds/build/params.hpp>
#include <dds/build/plan/archive.hpp>
#include <dds/build/plan/compile_file.hpp>
#include <dds/build/plan/exe.hpp>
#include <dds/build/plan/library.hpp>
#include <dds/build/plan/package.hpp>
#include <dds/library.hpp>

namespace dds {


+ 0
- 1
src/dds/build/plan/library.cpp View File

@@ -4,7 +4,6 @@

#include <range/v3/view/concat.hpp>
#include <range/v3/view/filter.hpp>
#include <spdlog/spdlog.h>

using namespace dds;


+ 0
- 1
src/dds/build/plan/library.hpp View File

@@ -6,7 +6,6 @@
#include <dds/usage_reqs.hpp>
#include <dds/util/fs.hpp>

#include <map>
#include <optional>
#include <string>
#include <vector>

+ 1
- 1
src/dds/build/plan/package.hpp View File

@@ -2,8 +2,8 @@

#include <dds/build/plan/library.hpp>

#include <map>
#include <string>
#include <vector>

namespace dds {


+ 0
- 3
src/dds/compdb.cpp View File

@@ -6,9 +6,6 @@

#include <nlohmann/json.hpp>

#include <range/v3/view/join.hpp>
#include <range/v3/view/transform.hpp>

using namespace dds;

void dds::generate_compdb(const build_plan& plan, build_env_ref env) {

+ 2
- 4
src/dds/dds.main.cpp View File

@@ -10,8 +10,6 @@
#include <range/v3/view/group_by.hpp>
#include <range/v3/view/transform.hpp>

#include <libman/parse.hpp>

#include <args.hxx>

#include <filesystem>
@@ -456,9 +454,9 @@ struct cli_deps {
*/

int main(int argc, char** argv) {
#if DDS_DEBUG
#if DDS_DEBUG
spdlog::set_level(spdlog::level::debug);
#endif
#endif
spdlog::set_pattern("[%H:%M:%S] [%^%-5l%$] %v");
args::ArgumentParser parser("DDS - The drop-dead-simple library manager");


+ 1
- 1
src/dds/deps.cpp View File

@@ -3,7 +3,6 @@
#include <dds/repo/repo.hpp>
#include <dds/sdist.hpp>
#include <dds/usage_reqs.hpp>
#include <dds/util/algo.hpp>
#include <dds/util/string.hpp>
#include <libman/index.hpp>
#include <libman/parse.hpp>
@@ -14,6 +13,7 @@

#include <cctype>
#include <map>
#include <set>

using namespace dds;


+ 0
- 1
src/dds/library.hpp View File

@@ -5,7 +5,6 @@
#include <dds/library_manifest.hpp>
#include <dds/source.hpp>

#include <optional>
#include <string>

namespace dds {

+ 0
- 1
src/dds/proc.common.cpp View File

@@ -3,7 +3,6 @@
#include <dds/util/string.hpp>

#include <algorithm>
#include <array>
#include <cctype>

using namespace dds;

+ 0
- 3
src/dds/repo/repo.cpp View File

@@ -6,10 +6,7 @@

#include <spdlog/spdlog.h>

#include <range/v3/action/join.hpp>
#include <range/v3/range/conversion.hpp>
#include <range/v3/view/filter.hpp>
#include <range/v3/view/join.hpp>
#include <range/v3/view/transform.hpp>

using namespace dds;

+ 0
- 1
src/dds/repo/repo.hpp View File

@@ -3,7 +3,6 @@
#include <dds/util/flock.hpp>
#include <dds/util/fs.hpp>

#include <cassert>
#include <functional>
#include <optional>
#include <shared_mutex>

+ 0
- 1
src/dds/sdist.cpp View File

@@ -9,7 +9,6 @@
#include <browns/output.hpp>
#include <neo/buffer.hpp>

#include <range/v3/algorithm/for_each.hpp>
#include <range/v3/algorithm/sort.hpp>
#include <range/v3/view/filter.hpp>


+ 0
- 2
src/dds/source.cpp View File

@@ -2,8 +2,6 @@

#include <dds/util/string.hpp>

#include <spdlog/spdlog.h>

#include <algorithm>
#include <optional>
#include <vector>

+ 0
- 1
src/dds/source.hpp View File

@@ -3,7 +3,6 @@
#include <dds/util/fs.hpp>

#include <optional>
#include <vector>

namespace dds {


+ 1
- 0
src/dds/toolchain/toolchain.hpp View File

@@ -4,6 +4,7 @@

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

namespace dds {

+ 1
- 1
src/libman/parse.hpp View File

@@ -271,7 +271,7 @@ template <typename T>
void validate_reader(T&&, std::string_view, ...) {}

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 did_read = (is(context, key, value) || ...);

Loading…
Cancel
Save