From c6478e245a636785a522ac6e577187d1ce1b9173 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 22 Jun 2025 17:22:41 -0400 Subject: [PATCH] fix up emitterutils source file in bundled yaml-cpp in ML-PACE for GCC 15+ --- cmake/Modules/Packages/ML-PACE.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/Modules/Packages/ML-PACE.cmake b/cmake/Modules/Packages/ML-PACE.cmake index 80e5085b7e..7d3d1a452e 100644 --- a/cmake/Modules/Packages/ML-PACE.cmake +++ b/cmake/Modules/Packages/ML-PACE.cmake @@ -53,6 +53,12 @@ else() add_library(yaml-cpp::yaml-cpp ALIAS yaml-cpp) endif() + # fixup yaml-cpp/emitterutils.cpp for GCC 15+ until patch is applied + file(READ ${lib-pace}/yaml-cpp/src/emitterutils.cpp yaml_emitterutils) + string(REPLACE "#include " "#include \n#include " yaml_tmp_emitterutils "${yaml_emitterutils}") + string(REPLACE "#include \n#include " "#include " yaml_emitterutils "${yaml_tmp_emitterutils}") + file(WRITE ${lib-pace}/yaml-cpp/src/emitterutils.cpp "${yaml_emitterutils}") + add_subdirectory(${lib-pace} build-pace EXCLUDE_FROM_ALL) set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})