Skip to content

Commit

Permalink
Check yaml-cpp version before build.
Browse files Browse the repository at this point in the history
Build it from github if it's < 0.5.3.
  • Loading branch information
ningfei committed Jun 15, 2018
1 parent 1e09238 commit 67907af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SuperBuild/SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if(USE_STATIC_RUNTIME)
mark_as_advanced(STATIC_LIBCXX)
if(NOT STATIC_LIBCXX)
unset(STATIC_LIBCXX CACHE)
# only on some Centos/Redhat systems
# Only on some Centos/Redhat systems
message(FATAL_ERROR
"\"USE_STATIC_RUNTIME\" set to ON but \"libstdcxx.a\" not found! \
\"yum install libstdc++-static\" to resolve the error.")
Expand Down Expand Up @@ -91,7 +91,8 @@ if(BATCH_VERSION)
pkg_check_modules(YAML-CPP yaml-cpp)
endif()

if(YAML-CPP_FOUND)
# Build from github if not found or version < 0.5.3
if(YAML-CPP_FOUND AND NOT (YAML-CPP_VERSION VERSION_LESS "0.5.3"))
set(YAML-CPP_DIR ${YAML-CPP_LIBDIR}/cmake/yaml-cpp CACHE PATH "Path to yaml-cpp configuration file" FORCE)
message("-- Using yaml-cpp library from ${YAML-CPP_DIR}")
else()
Expand Down

0 comments on commit 67907af

Please sign in to comment.