Files
leonarski_fandClaude Opus 5.5 43928ec490 Build information: compiler and CUDA version in rugnux's log and banner, the broker's and writer's start, the viewer's About
GitInfo gains jfjoch_build_compiler() (CMake's compiler id and version), jfjoch_build_cuda() (the CUDA
toolkit version, empty without CUDA) and jfjoch_build_info(with_cuda), one line of compiler, CUDA and flags,
stamped like the git hash. rugnux logs it as "Build:" (beside the "Build flags:" line the timing table
reads) and prints it under its version; jfjoch_broker and jfjoch_writer (without CUDA, which it does not
use) log it at start; jfjoch_viewer shows it in About. Nothing is written into the output files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXc1zD1yxHqaR1DGdCTHL4
2026-10-19 03:18:23 +02:00

37 lines
914 B
Plaintext

// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include <string>
std::string jfjoch_git_sha1() {
return "@GIT_SHA1@";
}
std::string jfjoch_git_date() {
return "@GIT_DATE@";
}
std::string jfjoch_version() {
return "@JFJOCH_VERSION@";
}
std::string jfjoch_build_cxx_flags() {
return "@JFJOCH_BUILD_CXX_FLAGS@";
}
std::string jfjoch_build_compiler() {
return "@JFJOCH_BUILD_COMPILER@";
}
std::string jfjoch_build_cuda() {
return "@JFJOCH_BUILD_CUDA@";
}
std::string jfjoch_build_info(bool with_cuda) {
std::string out = jfjoch_build_compiler();
if (with_cuda)
out += jfjoch_build_cuda().empty() ? ", no CUDA" : ", CUDA " + jfjoch_build_cuda();
out += jfjoch_build_cxx_flags().empty() ? ", no extra compiler flags" : ", flags " + jfjoch_build_cxx_flags();
return out;
}