mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Fix Ubuntu 20.04 SPQR build
Fixes #764 Change-Id: I045eb6653749d8a09f4aeb617163288cbf92ad56
This commit is contained in:
@@ -435,6 +435,14 @@ if (BUILD_TESTING AND GFLAGS)
|
||||
PRIVATE ${Ceres_SOURCE_DIR}/internal/ceres
|
||||
${CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS})
|
||||
target_link_libraries(${NAME}_test PRIVATE gtest test_util ceres_static)
|
||||
|
||||
# covariance_test uses SuiteSparseQR.hpp. However, since SuiteSparse import
|
||||
# targets are private (link only) dependencies not propagated to consumers,
|
||||
# we need to link against the target explicitly here.
|
||||
if (TARGET SuiteSparse::SPQR)
|
||||
target_link_libraries (${NAME}_test PRIVATE SuiteSparse::SPQR)
|
||||
endif (TARGET SuiteSparse::SPQR)
|
||||
|
||||
add_test(NAME ${NAME}_test
|
||||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${NAME}_test
|
||||
--test_srcdir
|
||||
|
||||
Reference in New Issue
Block a user