Skip to content

Commit c70f415

Browse files
authored
Bump yaml-cpp to v0.8.0 (#857)
he support for CMake3.4 does not play well with our configuration, so * Use -DCMAKE_POLICY_VERSION_MINIMUM=3.14 * Statically link: target_compile_definitions(ebpfverifier PRIVATE YAML_CPP_STATIC_DEFINE) There's a pending PR regarding removal of CMake 3.4: jbeder/yaml-cpp#1351 Signed-off-by: Elazar Gershuni <[email protected]>
1 parent 157786e commit c70f415

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,17 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
6666
set(Boost_LIBRARY_DIRS ${CMAKE_BINARY_DIR}/packages/boost_filesystem-vc143/lib/native)
6767

6868
if (VERIFIER_ENABLE_TESTS)
69-
# MSVC's "std:c++20" option is the current standard that supports all the C++17
70-
# features we use. However, cmake can't deal with that here, so we set it below.
71-
7269
set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/packages/yaml-cpp)
7370
include(ExternalProject)
7471
ExternalProject_Add(yaml-cpp
7572
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
76-
GIT_TAG "yaml-cpp-0.7.0"
73+
GIT_TAG "0.8.0"
7774
GIT_SHALLOW true
7875
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
7976
-DYAML_MSVC_SHARED_RT=ON
8077
-DYAML_CPP_BUILD_TESTS=OFF
8178
-DYAML_CPP_BUILD_TOOLS=OFF
79+
-DCMAKE_POLICY_VERSION_MINIMUM=3.14
8280
)
8381
set(YAML_CPP_LIBRARIES ${EXTERNAL_INSTALL_LOCATION}/lib/yaml-cpp$<$<CONFIG:DEBUG>:d>.lib)
8482
set(YAML_CPP_INCLUDE_DIR ${EXTERNAL_INSTALL_LOCATION}/include/)
@@ -133,6 +131,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
133131
endif ()
134132

135133
add_library(ebpfverifier ${LIB_SRC})
134+
target_compile_definitions(ebpfverifier PRIVATE YAML_CPP_STATIC_DEFINE)
136135

137136
if (VERIFIER_ENABLE_TESTS)
138137
add_executable(check src/main/check.cpp src/main/linux_verifier.cpp)

0 commit comments

Comments
 (0)