From 95acc60ab5a1c0f69996141a0968bc1c4f3a5c79 Mon Sep 17 00:00:00 2001 From: Viktor Gal Date: Fri, 18 Nov 2016 12:20:45 +0800 Subject: [PATCH] Explicitly specialize cholesky_insert template function make shogun-unit-test depends on GoogleMock project --- src/shogun/regression/LeastAngleRegression.cpp | 4 +++- tests/unit/CMakeLists.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shogun/regression/LeastAngleRegression.cpp b/src/shogun/regression/LeastAngleRegression.cpp index 53f5c4899af..1e2f23183b4 100644 --- a/src/shogun/regression/LeastAngleRegression.cpp +++ b/src/shogun/regression/LeastAngleRegression.cpp @@ -424,4 +424,6 @@ SGMatrix CLeastAngleRegression::cholesky_delete(SGMatrix& R, int32_t i_k } template bool CLeastAngleRegression::train_machine_templated(CDenseFeatures * data); -template bool CLeastAngleRegression::train_machine_templated(CDenseFeatures * data); \ No newline at end of file +template bool CLeastAngleRegression::train_machine_templated(CDenseFeatures * data); +template SGMatrix CLeastAngleRegression::cholesky_insert(const SGMatrix& X, const SGMatrix& X_active, SGMatrix& R, int32_t i_max_corr, int32_t num_active); +template SGMatrix CLeastAngleRegression::cholesky_insert(const SGMatrix& X, const SGMatrix& X_active, SGMatrix& R, int32_t i_max_corr, int32_t num_active); diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index a616c75b8a2..8db4fc2c509 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -81,6 +81,7 @@ add_executable (discover_gtest_tests FILE(GLOB_RECURSE UNITTEST_SRC *_unittest.cc) ADD_EXECUTABLE(shogun-unit-test ${UNITTEST_SRC} ${TEMPLATE_GENERATED_UNITTEST}) +add_dependencies(shogun-unit-test GoogleMock) target_link_libraries(shogun-unit-test shogun gmock gtest ${SANITIZER_LIBRARY}) IF (SANITIZER_FLAGS) set_target_properties(shogun-unit-test PROPERTIES COMPILE_FLAGS ${SANITIZER_FLAGS})