Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,17 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(Boost_LIBRARY_DIRS ${CMAKE_BINARY_DIR}/packages/boost_filesystem-vc143/lib/native)

if (VERIFIER_ENABLE_TESTS)
# MSVC's "std:c++20" option is the current standard that supports all the C++17
# features we use. However, cmake can't deal with that here, so we set it below.

set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/packages/yaml-cpp)
include(ExternalProject)
ExternalProject_Add(yaml-cpp
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
GIT_TAG "yaml-cpp-0.7.0"
GIT_TAG "0.8.0"
GIT_SHALLOW true
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
-DYAML_MSVC_SHARED_RT=ON
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DCMAKE_POLICY_VERSION_MINIMUM=3.14
)
set(YAML_CPP_LIBRARIES ${EXTERNAL_INSTALL_LOCATION}/lib/yaml-cpp$<$<CONFIG:DEBUG>:d>.lib)
set(YAML_CPP_INCLUDE_DIR ${EXTERNAL_INSTALL_LOCATION}/include/)
Expand Down Expand Up @@ -133,6 +131,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif ()

add_library(ebpfverifier ${LIB_SRC})
target_compile_definitions(ebpfverifier PRIVATE YAML_CPP_STATIC_DEFINE)

if (VERIFIER_ENABLE_TESTS)
add_executable(check src/main/check.cpp src/main/linux_verifier.cpp)
Expand Down