diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-23 21:32:15 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-23 21:32:15 +0200 |
commit | b3940deda8d874f2c73ed64fadfb1de89b8f2353 (patch) | |
tree | 47744cc1ca488a768f206c006237437b4ebeb1f9 /configure.cc | |
parent | 26592ef373601f8e8185676945cf745c0f73d215 (diff) |
Add env vars to configure cmd.
Diffstat (limited to 'configure.cc')
-rw-r--r-- | configure.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.cc b/configure.cc index c19910e..ab2f837 100644 --- a/configure.cc +++ b/configure.cc @@ -233,24 +233,28 @@ int configure(int argc, char* argv[]) auto cc_env = getenv("CC"); if(cc_env) { + cmd_str = std::string("CC=") + cc_env + " " + cmd_str; cc_prog = cc_env; } auto cxx_env = getenv("CXX"); if(cxx_env) { + cmd_str = std::string("CXX=") + cxx_env + " " + cmd_str; cxx_prog = cxx_env; } auto ar_env = getenv("AR"); if(ar_env) { + cmd_str = std::string("AR=") + ar_env + " " + cmd_str; ar_prog = ar_env; } auto ld_env = getenv("LD"); if(ld_env) { + cmd_str = std::string("LD=") + ld_env + " " + cmd_str; ld_prog = ld_env; } @@ -263,6 +267,7 @@ int configure(int argc, char* argv[]) std::string build_ar = locate(build_arch, ar_prog); std::string build_ld = locate(build_arch, ld_prog); + std::cout << "Writing results to: " << configurationFile.string() << "\n"; { std::ofstream istr(configurationFile); istr << "#include \"libcppbuild.h\"\n\n"; |