Verified Commit a7b9d5b7 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

test: fix search of optional dependencies

parent 13844c02
Pipeline #10763 passed with stage
in 217 minutes and 44 seconds
......@@ -136,17 +136,15 @@ IF(BUILD_ADVANCED_TESTING)
ADD_PINOCCHIO_UNIT_TEST(multiprecision)
SET_PROPERTY(TARGET test-cpp-multiprecision PROPERTY CXX_STANDARD 11)
find_package(PkgConfig QUIET)
IF(PkgConfig_FOUND)
pkg_check_modules(MPFR QUIET mpfr)
IF(MPFR_FOUND)
ADD_PINOCCHIO_UNIT_TEST(multiprecision-mpfr)
SET_PROPERTY(TARGET test-cpp-multiprecision-mpfr PROPERTY CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(test-cpp-multiprecision-mpfr PUBLIC ${MPFR_LIBRARIES})
TARGET_INCLUDE_DIRECTORIES(test-cpp-multiprecision-mpfr PUBLIC ${MPFR_INCLUDE_DIRS})
TARGET_COMPILE_OPTIONS(test-cpp-multiprecision-mpfr PUBLIC ${MPFR_CFLAGS_OTHER})
ENDIF(MPFR_FOUND)
ENDIF(PkgConfig_FOUND)
ADD_COMPILE_DEPENDENCY(gmp)
ADD_COMPILE_DEPENDENCY(mpfr)
IF(MPFR_FOUND)
ADD_PINOCCHIO_UNIT_TEST(multiprecision-mpfr)
PKG_CONFIG_USE_DEPENDENCY(test-cpp-multiprecision-mpfr gmp)
PKG_CONFIG_USE_DEPENDENCY(test-cpp-multiprecision-mpfr mpfr)
SET_PROPERTY(TARGET test-cpp-multiprecision-mpfr PROPERTY CXX_STANDARD 11)
ENDIF(MPFR_FOUND)
ENDIF(BUILD_ADVANCED_TESTING)
# Automatic differentiation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment