Root cause analysis: - clang-cl on GitHub Actions Windows Server 2022 cannot find std::filesystem - The compiler defaults to pre-C++17 compatibility, exposing only std::experimental::filesystem - Build logs show: -std=c++23 (Unix-style flag) instead of /std:c++latest (MSVC-style flag) Key insight: CMAKE_CXX_COMPILER_FRONTEND_VARIANT is needed to distinguish: - "MSVC": clang-cl (Clang with MSVC command-line interface) - "GNU": regular Clang on Windows Solution: 1. Use CMAKE_CXX_COMPILER_FRONTEND_VARIANT to properly detect clang-cl 2. Add /std:c++latest flag specifically to yaze_util target (where filesystem is used) 3. Apply as PUBLIC compile option so it propagates to dependent targets This targets the exact source of the problem - clang-cl needs MSVC-style /std:c++latest flag to access modern MSVC STL features including std::filesystem. Tested approach based on CMake 3.16+ feature CMAKE_CXX_COMPILER_FRONTEND_VARIANT. Related commits:19196ca87c,c2bb90a3f1,b556b155a5Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.4 KiB
2.4 KiB