Builds: file times without to_sys (Windows), no C++ module scan (Android on GitHub)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NMSrd5oe1GpUD7E6d825KP
This commit is contained in:
Nexoniarz 2026-10-19 22:11:08 +02:00
commit 65705d82f3
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.25) cmake_minimum_required(VERSION 3.25)
project(Fry3DX VERSION 0.5.0 LANGUAGES C CXX) project(Fry3DX VERSION 0.5.0 LANGUAGES C CXX)
set(CMAKE_CXX_SCAN_FOR_MODULES OFF) # (no C++ modules; the scan can pick up a different clang than the NDK's)
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
add_link_options(-rdynamic) # function names in crash reports add_link_options(-rdynamic) # function names in crash reports
endif() endif()

View file

@ -1125,8 +1125,8 @@ private:
std::getline(in, from); std::getline(in, from);
std::error_code ec; std::error_code ec;
// (in local time: through time_t, as not every C++ library has time zones yet) // (in local time: through time_t, as not every C++ library has time zones yet)
const std::time_t t = std::chrono::system_clock::to_time_t( const auto age = stdfs::file_time_type::clock::now() - stdfs::last_write_time(f, ec); // (file clocks differ by library: by age)
std::chrono::time_point_cast<std::chrono::system_clock::duration>(stdfs::file_time_type::clock::to_sys(stdfs::last_write_time(f, ec)))); const std::time_t t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now() - std::chrono::duration_cast<std::chrono::system_clock::duration>(age));
std::tm local{}; std::tm local{};
#if defined(_WIN32) #if defined(_WIN32)
localtime_s(&local, &t); localtime_s(&local, &t);