Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nils Gladitz
CMake
Commits
a5a6ac70
Commit
a5a6ac70
authored
Apr 14, 2021
by
Brad King
💬
Browse files
Find{BLAS,LAPACK}: Clarify name of internal argument for dependencies
parent
d248401d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Modules/FindBLAS.cmake
View file @
a5a6ac70
...
...
@@ -208,7 +208,7 @@ endif()
# TODO: move this stuff to a separate module
macro
(
CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _
threadlib
s _addlibdir _subdirs
)
macro
(
CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _
dep
s _addlibdir _subdirs
)
# This macro checks for the existence of the combination of fortran libraries
# given by _list. If the combination is found, this macro checks (using the
# Check_Fortran_Function_Exists macro) whether can link against that library
...
...
@@ -242,8 +242,8 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add
list
(
APPEND
${
LIBRARIES
}
"
${
_library
}
"
)
else
()
set
(
_combined_name
${
_combined_name
}
_
${
_library
}
)
if
(
NOT
"
${
_
threadlib
s
}
"
STREQUAL
""
)
set
(
_combined_name
${
_combined_name
}
_
threadlib
s
)
if
(
NOT
"
${
_
dep
s
}
"
STREQUAL
""
)
set
(
_combined_name
${
_combined_name
}
_
dep
s
)
endif
()
if
(
_libraries_work
)
find_library
(
${
_prefix
}
_
${
_library
}
_LIBRARY
...
...
@@ -265,7 +265,7 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add
endforeach
()
if
(
_libraries_work
)
# Test this combination of libraries.
set
(
CMAKE_REQUIRED_LIBRARIES
${
_flags
}
${${
LIBRARIES
}}
${
_
threadlib
s
}
)
set
(
CMAKE_REQUIRED_LIBRARIES
${
_flags
}
${${
LIBRARIES
}}
${
_
dep
s
}
)
if
(
CMAKE_Fortran_COMPILER_LOADED
)
check_fortran_function_exists
(
"
${
_name
}
"
${
_prefix
}${
_combined_name
}
_WORKS
)
else
()
...
...
@@ -279,7 +279,7 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add
if
(
"
${
_list
}
"
STREQUAL
""
)
set
(
${
LIBRARIES
}
"
${
LIBRARIES
}
-PLACEHOLDER-FOR-EMPTY-LIBRARIES"
)
else
()
list
(
APPEND
${
LIBRARIES
}
${
_
threadlib
s
}
)
list
(
APPEND
${
LIBRARIES
}
${
_
dep
s
}
)
endif
()
else
()
set
(
${
LIBRARIES
}
FALSE
)
...
...
Modules/FindLAPACK.cmake
View file @
a5a6ac70
...
...
@@ -190,7 +190,7 @@ endmacro()
# TODO: move this stuff to a separate module
macro
(
CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _
threadlib
s _addlibdir _subdirs _blas
)
macro
(
CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _
dep
s _addlibdir _subdirs _blas
)
# This macro checks for the existence of the combination of fortran libraries
# given by _list. If the combination is found, this macro checks (using the
# Check_Fortran_Function_Exists macro) whether can link against that library
...
...
@@ -224,8 +224,8 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
list
(
APPEND
${
LIBRARIES
}
"
${
_library
}
"
)
else
()
set
(
_combined_name
${
_combined_name
}
_
${
_library
}
)
if
(
NOT
"
${
_
threadlib
s
}
"
STREQUAL
""
)
set
(
_combined_name
${
_combined_name
}
_
threadlib
s
)
if
(
NOT
"
${
_
dep
s
}
"
STREQUAL
""
)
set
(
_combined_name
${
_combined_name
}
_
dep
s
)
endif
()
if
(
_libraries_work
)
find_library
(
${
_prefix
}
_
${
_library
}
_LIBRARY
...
...
@@ -248,7 +248,7 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
endforeach
()
if
(
_libraries_work
)
# Test this combination of libraries.
set
(
CMAKE_REQUIRED_LIBRARIES
${
_flags
}
${${
LIBRARIES
}}
${
_blas
}
${
_
threadlib
s
}
)
set
(
CMAKE_REQUIRED_LIBRARIES
${
_flags
}
${${
LIBRARIES
}}
${
_blas
}
${
_
dep
s
}
)
if
(
CMAKE_Fortran_COMPILER_LOADED
)
check_fortran_function_exists
(
"
${
_name
}
"
${
_prefix
}${
_combined_name
}
_WORKS
)
else
()
...
...
@@ -262,7 +262,7 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
if
(
"
${
_list
}${
_blas
}
"
STREQUAL
""
)
set
(
${
LIBRARIES
}
"
${
LIBRARIES
}
-PLACEHOLDER-FOR-EMPTY-LIBRARIES"
)
else
()
list
(
APPEND
${
LIBRARIES
}
${
_blas
}
${
_
threadlib
s
}
)
list
(
APPEND
${
LIBRARIES
}
${
_blas
}
${
_
dep
s
}
)
endif
()
else
()
set
(
${
LIBRARIES
}
FALSE
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment