Skip to content

Commit

Permalink
Merge pull request ornladios#3799 from vicentebolea/support-new-yaml-cpp
Browse files Browse the repository at this point in the history
yaml-cpp: support 0.8.0 version
  • Loading branch information
vicentebolea authored Sep 12, 2023
2 parents 2322908 + 9cd8e62 commit 8db9727
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,20 @@ add_subdirectory(nlohmann_json)
adios2_add_thirdparty_target(nlohmann_json nlohmann_json_wrapper)

if(ADIOS2_USE_EXTERNAL_YAMLCPP)
find_package(yaml-cpp REQUIRED)
find_package(yaml-cpp 0.7.0 REQUIRED)
else()
add_subdirectory(yaml-cpp)
endif()

adios2_add_thirdparty_target(yaml-cpp yaml-cpp)

# YAML-cpp does not add the incdir/libdir to its target rather it exposes it
# through the cmake variables YAML_CPP_INCLUDE_DIR and YAML_CPP_LIBRARY_DIR
if(yaml-cpp_VERSION VERSION_GREATER_EQUAL 0.8)
target_include_directories(adios2::thirdparty::yaml-cpp INTERFACE ${YAML_CPP_INCLUDE_DIR})
target_link_directories(adios2::thirdparty::yaml-cpp INTERFACE ${YAML_CPP_LIBRARY_DIR})
endif()

if(WIN32)
add_subdirectory(mingw-w64)
endif()
Expand Down

0 comments on commit 8db9727

Please sign in to comment.