|
|
|
|
|
|
|
|
const auto obj_path = calc_object_file_path(env); |
|
|
const auto obj_path = calc_object_file_path(env); |
|
|
fs::create_directories(obj_path.parent_path()); |
|
|
fs::create_directories(obj_path.parent_path()); |
|
|
|
|
|
|
|
|
spdlog::info("[{}] Compile: {}", |
|
|
|
|
|
_qualifier, |
|
|
|
|
|
fs::relative(_source.path, _source.basis_path).string()); |
|
|
|
|
|
|
|
|
auto msg = fmt::format("[{}] Compile: {:40}", _qualifier, fs::relative(_source.path, _source.basis_path).string()); |
|
|
|
|
|
|
|
|
|
|
|
spdlog::info(msg); |
|
|
auto start_time = std::chrono::steady_clock::now(); |
|
|
auto start_time = std::chrono::steady_clock::now(); |
|
|
|
|
|
|
|
|
auto cmd = generate_compile_command(env); |
|
|
auto cmd = generate_compile_command(env); |
|
|
|
|
|
|
|
|
auto end_time = std::chrono::steady_clock::now(); |
|
|
auto end_time = std::chrono::steady_clock::now(); |
|
|
auto dur_ms = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time); |
|
|
auto dur_ms = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time); |
|
|
|
|
|
|
|
|
spdlog::info("[{}] Compile: {} - {:n}ms", |
|
|
|
|
|
_qualifier, |
|
|
|
|
|
fs::relative(_source.path, _source.basis_path).string(), |
|
|
|
|
|
dur_ms.count()); |
|
|
|
|
|
|
|
|
spdlog::info("{} - {:>5n}ms", msg, dur_ms.count()); |
|
|
|
|
|
|
|
|
if (!compile_res.okay()) { |
|
|
if (!compile_res.okay()) { |
|
|
spdlog::error("Compilation failed: {}", _source.path.string()); |
|
|
spdlog::error("Compilation failed: {}", _source.path.string()); |