Skip to content

Commit 613989f

Browse files
committed
[libs][External] set yaml-cpp to system lib
1 parent eb86cfe commit 613989f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libs/EXTERNAL/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ add_subdirectory(libblifparse)
1313
add_subdirectory(libtatum)
1414
add_subdirectory(libcatch2)
1515

16-
set_directory_properties(PROPERTIES COMPILE_OPTIONS "-Wno-switch-default")
1716
add_subdirectory(yaml-cpp)
17+
# Treat yaml-cpp headers as system headers to suppress warnings
18+
if(TARGET yaml-cpp)
19+
get_target_property(YAML_INCLUDE_DIRS yaml-cpp INTERFACE_INCLUDE_DIRECTORIES)
20+
set_target_properties(yaml-cpp PROPERTIES
21+
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${YAML_INCLUDE_DIRS}"
22+
)
23+
endif()
1824

1925
#add_subdirectory(parmys)
2026

0 commit comments

Comments
 (0)