Skip to content

Commit d50e590

Browse files
fix: upgrade yaml-cpp to 0.8.0 and add MSYS2 CMake policy override
- Upgrade yaml-cpp from 0.6.3 to 0.8.0 to fix deprecated std::iterator warnings in Ubuntu sanitizer builds - Add CMAKE_POLICY_DEFAULT_CMP0077 for Windows MSYS2 compatibility - Improve MSYS2 detection condition to handle both generator and environment variables - Fixes CI failures on Windows MSYS2 (CLANG64/UCRT64) and Ubuntu sanitizer builds Co-Authored-By: Jake Cosme <[email protected]>
1 parent 9be196a commit d50e590

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured
9292
FetchContent_Declare(
9393
yaml-cpp
9494
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
95-
GIT_TAG yaml-cpp-0.6.3
95+
GIT_TAG 0.8.0
9696
)
9797

9898
# Configure yaml-cpp for platform compatibility
99-
if(WIN32 AND CMAKE_GENERATOR MATCHES "MSYS Makefiles")
99+
if(WIN32 AND (CMAKE_GENERATOR MATCHES "MSYS Makefiles" OR MSYS))
100100
set(YAML_BUILD_SHARED_LIBS ON CACHE BOOL "Build yaml-cpp as shared library for MSYS2")
101+
set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "Disable yaml-cpp contrib for MSYS2")
102+
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW CACHE STRING "Use NEW policy for option() behavior")
101103
endif()
102104

103105
# Disable yaml-cpp tests and tools to avoid build issues

0 commit comments

Comments
 (0)