From 8e071ffe4974ce7394dfb2b994715bf2cacd1c60 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Sun, 24 Nov 2019 23:47:33 -0500 Subject: [PATCH] Fix coverage build by linking against quadmath. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 477c0a9b40..8363bd59c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,7 +143,7 @@ endif() # Setup build for test coverage if(BUILD_WITH_COVERAGE) - # Currently coverage only works with GNU g++ + # Currently coverage only works with GNU g++. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # Find gcov and lcov find_program(GCOV gcov) @@ -155,6 +155,7 @@ if(BUILD_WITH_COVERAGE) endif() set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} "supc++") + set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} "quadmath") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fno-inline -fno-inline-small-functions -fno-default-inline -fprofile-arcs -fkeep-inline-functions") message(STATUS "Adding debug compile options for code coverage.") # Remove optimizations for better line coverage