Ver código fonte

Move the definition of `build_plan`

default_compile_flags
vector-of-bool 5 anos atrás
pai
commit
45d6e7be7d
7 arquivos alterados com 24 adições e 36 exclusões
  1. +1
    -1
      src/dds/build/iter_compilations.hpp
  2. +0
    -26
      src/dds/build/plan.hpp
  3. +1
    -1
      src/dds/build/plan/full.cpp
  4. +20
    -5
      src/dds/build/plan/full.hpp
  5. +1
    -1
      src/dds/compdb.hpp
  6. +0
    -1
      src/dds/ddslim.main.cpp
  7. +1
    -1
      src/dds/deps.hpp

+ 1
- 1
src/dds/build/iter_compilations.hpp Ver arquivo

@@ -1,6 +1,6 @@
#pragma once

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

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

+ 0
- 26
src/dds/build/plan.hpp Ver arquivo

@@ -1,26 +0,0 @@
#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 {

class build_plan {
std::vector<package_plan> _packages;

public:
package_plan& add_package(package_plan p) noexcept {
return _packages.emplace_back(std::move(p));
}
auto& packages() const noexcept { return _packages; }
void compile_all(const build_env& env, int njobs) const;
void archive_all(const build_env& env, int njobs) const;
void link_all(const build_env& env, int njobs) const;
};

} // namespace dds

src/dds/build/plan.cpp → src/dds/build/plan/full.cpp Ver arquivo

@@ -1,4 +1,4 @@
#include "./plan.hpp"
#include "./full.hpp"

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

+ 20
- 5
src/dds/build/plan/full.hpp Ver arquivo

@@ -1,11 +1,26 @@
#pragma once

#include <build/plan/package.hpp>

#include <map>
#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 {

class build_plan2 {};
class build_plan {
std::vector<package_plan> _packages;

public:
package_plan& add_package(package_plan p) noexcept {
return _packages.emplace_back(std::move(p));
}
auto& packages() const noexcept { return _packages; }
void compile_all(const build_env& env, int njobs) const;
void archive_all(const build_env& env, int njobs) const;
void link_all(const build_env& env, int njobs) const;
};

} // namespace dds
} // namespace dds

+ 1
- 1
src/dds/compdb.hpp Ver arquivo

@@ -1,6 +1,6 @@
#pragma once

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

namespace dds {


+ 0
- 1
src/dds/ddslim.main.cpp Ver arquivo

@@ -1,5 +1,4 @@
#include <dds/build.hpp>
#include <dds/build/plan.hpp>
#include <dds/logging.hpp>
#include <dds/repo/repo.hpp>
#include <dds/sdist.hpp>

+ 1
- 1
src/dds/deps.hpp Ver arquivo

@@ -1,6 +1,6 @@
#pragma once

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

#include <semver/version.hpp>


Carregando…
Cancelar
Salvar