Skip to content

Commit 79d8d00

Browse files
committed
simplify getting LAPACK_LIBRARY_DIR
1 parent 979c7ab commit 79d8d00

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cmake/tpl/SundialsLapack.cmake

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,8 @@ find_package(LAPACK REQUIRED)
4646

4747
# get path to LAPACK library to use in generated makefiles for examples, if
4848
# LAPACK_LIBRARIES contains multiple items only use the path of the first entry
49-
list(LENGTH LAPACK_LIBRARIES len)
50-
if(len EQUAL 1)
51-
get_filename_component(LAPACK_LIBRARY_DIR ${LAPACK_LIBRARIES} PATH)
52-
else()
53-
list(GET LAPACK_LIBRARIES 0 TMP_LAPACK_LIBRARIES)
54-
get_filename_component(LAPACK_LIBRARY_DIR ${TMP_LAPACK_LIBRARIES} PATH)
55-
endif()
49+
list(GET LAPACK_LIBRARIES 0 TMP_LAPACK_LIBRARIES)
50+
get_filename_component(LAPACK_LIBRARY_DIR ${TMP_LAPACK_LIBRARIES} PATH)
5651

5752
# -----------------------------------------------------------------------------
5853
# Section 4: Test the TPL

0 commit comments

Comments
 (0)