yaml-cpp
yaml-cpp copied to clipboard
Fail to use ExternalProject_Add with yaml-cpp
Hi, I am trying to integrate yaml-cpp to my project with ExternalProject_Add:
# build directory
set(yaml_cpp_PREFIX ${CMAKE_BINARY_DIR}/external/yaml-cpp-prefix)
# install directory
set(yaml_cpp_INSTALL ${CMAKE_BINARY_DIR}/external/yaml-cpp-install)
ExternalProject_Add(
yaml-cpp
URL "https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.6.3.tar.gz"
PREFIX ${yaml_cpp_PREFIX}
SOURCE_DIR "${yaml_cpp_PREFIX}"
INSTALL_DIR "${yaml_cpp_INSTALL}"
LOG_DOWNLOAD FALSE
DOWNLOAD_NO_PROGRESS TRUE
UPDATE_COMMAND ""
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DYAML_CPP_BUILD_TESTS=OFF
)
set(YAML_CPP_LIBRARES ${yaml_cpp_INSTALL}/lib/libyaml-cpp.a)
set(YAML_CPP_INCLUDE_DIRS ${yaml_cpp_INSTALL}/include)
The building fails with error cmake -E touch: failed to update "/Users/ZhenyiYe/CLionProjects/DocuDewarp/cmake-build-release/external/yaml-cpp-prefix/src/yaml-cpp-stamp/yaml-cpp-download".
but download has finished.
After finishing download and commenting out the URL line, the building is successful without problem. Is there any suggestions to my configuration here?