diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-11 16:35:57 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-11 17:09:12 +0100 |
commit | f31661d392c1332ceb0edcbc9fd35f4cb49bb50d (patch) | |
tree | 6034e11da079476e0ab4b0b3c6bfefaee187d5e9 /src/bootstrap.cc | |
parent | 0b0cb4afa08210b572a9be6cadcb6397935b99d1 (diff) |
Support using custom build-dir during bootstrap.
Diffstat (limited to 'src/bootstrap.cc')
-rw-r--r-- | src/bootstrap.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap.cc b/src/bootstrap.cc index c58c399..d473689 100644 --- a/src/bootstrap.cc +++ b/src/bootstrap.cc @@ -42,6 +42,12 @@ const std::string& getConfiguration(const std::string& key, return s; } + if(key == cfg::builddir && std::getenv("BUILDDIR")) + { + static std::string s = std::getenv("BUILDDIR"); + return s; + } + return defaultValue; } @@ -56,7 +62,7 @@ int main(int argc, char* argv[]) Settings settings{}; - settings.builddir = getConfiguration(cfg::builddir, "build"); + settings.builddir = getConfiguration(cfg::builddir, settings.builddir); settings.parallel_processes = std::max(1u, std::thread::hardware_concurrency() * 2 - 1); settings.verbose = 0; |