Skip to content
Snippets Groups Projects
Commit 81b2918c authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

eigenvaluetest handles LAPACK dependency

If LAPACK is not available, it return 77 indicating skipped test
parent a34702f2
No related branches found
No related tags found
No related merge requests found
......@@ -79,9 +79,7 @@ add_executable("dynvectortest" dynvectortest.cc)
add_executable("eigenvaluestest" eigenvaluestest.cc)
target_link_libraries(eigenvaluestest dunecommon)
if(LAPACK_FOUND)
target_link_libraries(eigenvaluestest ${LAPACK_LIBRARIES})
endif(LAPACK_FOUND)
target_link_libraries(eigenvaluestest ${LAPACK_LIBRARIES})
add_executable("diagonalmatrixtest" diagonalmatrixtest.cc)
target_link_libraries("diagonalmatrixtest" "dunecommon")
......@@ -172,6 +170,7 @@ endforeach(_TEST)
# treat tests returning code 77 as skipped
set_tests_properties(
eigenvaluestest
mpicollectivecommunication
PROPERTIES SKIP_RETURN_CODE 77)
......
......@@ -14,6 +14,7 @@
using namespace Dune;
#if HAVE_LAPACK
/** \brief Test the eigenvalue code with the Rosser test matrix
This matrix was a challenge for many matrix eigenvalue
......@@ -124,14 +125,20 @@ void testSymmetricFieldMatrix()
DUNE_THROW(MathError, "Values computed by FMatrixHelp::eigenValues are not in ascending order");
}
}
#endif // HAVE_LAPACK
int main() try
{
#if HAVE_LAPACK
testRosserMatrix<double>();
testSymmetricFieldMatrix<double>();
return 0;
#else
std::cout << "WARNING: eigenvaluetest needs LAPACK, test disabled" << std::endl;
return 77;
#endif // HAVE_LAPACK
} catch (Exception exception)
{
std::cerr << exception << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment