diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-13 19:56:35 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-13 22:32:09 +0100 |
commit | 916060cb53fddb94f64b20d3616e7360c5e91f64 (patch) | |
tree | 4a2bcef4672b5e04b106f88cca3bec631b214c00 /src/rebuild.cc | |
parent | c093758b4688fb5bae2cc7727b6c9b52b824043e (diff) |
Capture flags in a class instead of a string and add conversion functions between them.
Diffstat (limited to 'src/rebuild.cc')
-rw-r--r-- | src/rebuild.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/rebuild.cc b/src/rebuild.cc index dec7119..c97452d 100644 --- a/src/rebuild.cc +++ b/src/rebuild.cc @@ -162,27 +162,21 @@ bool recompileCheck(const ctor::settings& global_settings, int argc, char* argv[ config.name = "ctor"; config.system = ctor::output_system::build; - auto toolchain = getToolChain(config.system); + config.flags.cxxflags.push_back({ctor::cxx_opt::optimization, "3"}); + config.flags.cxxflags.push_back({ctor::cxx_opt::cpp_std, "c++20"}); - append(config.flags.cxxflags, - getOption(toolchain, ctor::opt::optimization, "3")); - append(config.flags.cxxflags, - getOption(toolchain, ctor::opt::cpp_std, "c++20")); const auto& c = ctor::get_configuration(); if(c.has(ctor::cfg::ctor_includedir)) { - append(config.flags.cxxflags, - getOption(toolchain, ctor::opt::include_path, - c.get(ctor::cfg::ctor_includedir))); + config.flags.cxxflags.push_back({ctor::cxx_opt::include_path, + c.get(ctor::cfg::ctor_includedir)}); } if(c.has(ctor::cfg::ctor_libdir)) { - append(config.flags.ldflags, - getOption(toolchain, ctor::opt::library_path, - c.get(ctor::cfg::ctor_libdir))); + config.flags.ldflags.push_back({ctor::ld_opt::library_path, c.get(ctor::cfg::ctor_libdir)}); } - append(config.flags.ldflags, getOption(toolchain, ctor::opt::link, "ctor")); - append(config.flags.ldflags, getOption(toolchain, ctor::opt::threads)); + config.flags.ldflags.push_back({ctor::ld_opt::link, "ctor"}); + config.flags.ldflags.push_back({ctor::ld_opt::threads}); ctor::settings settings{global_settings}; settings.verbose = -1; // Make check completely silent. |