File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed
Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 11message (STATUS "CBLAS enabled" )
22enable_language (C)
3- enable_language (Fortran)
43
5- # Check for any necessary platform specific compiler flags
6- include (CheckLAPACKCompilerFlags)
7- CheckLAPACKCompilerFlags()
4+ include (CheckLanguage)
5+ check_language(Fortran)
6+ if (CMAKE_Fortran_COMPILER)
7+ enable_language (Fortran)
8+
9+ # Check for any necessary platform specific compiler flags
10+ include (CheckLAPACKCompilerFlags)
11+ CheckLAPACKCompilerFlags()
12+ endif ()
813
914set (LAPACK_INSTALL_EXPORT_NAME ${CBLASLIB} -targets)
1015
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ endif()
4242if (NOT FortranCInterface_GLOBAL_FOUND OR NOT FortranCInterface_MODULE_FOUND)
4343 message (WARNING "Reverting to pre-defined include/cblas_mangling.h" )
4444 configure_file (
45- include / cblas_mangling_with_flags.h.in
45+ cblas_mangling_with_flags.h.in
4646 ${LAPACK_BINARY_DIR} /include /cblas_mangling.h)
4747endif ()
4848
Original file line number Diff line number Diff line change @@ -249,9 +249,6 @@ if(NOT BLAS_FOUND)
249249 message (STATUS "Using supplied NETLIB BLAS implementation" )
250250 add_subdirectory (BLAS)
251251 set (BLAS_LIBRARIES ${BLASLIB} )
252-
253- # Include cblas_f77.h and cblas_mangling.h even if CBLAS is not built
254- add_subdirectory (CBLAS/include )
255252else ()
256253 add_link_options (${BLAS_LINKER_FLAGS} )
257254endif ()
@@ -261,6 +258,11 @@ endif()
261258# CBLAS
262259option (CBLAS "Build CBLAS" OFF )
263260
261+ # Include cblas_f77.h and cblas_mangling.h even if CBLAS is not built
262+ if (CBLAS OR NOT BLAS_FOUND)
263+ add_subdirectory (CBLAS/include )
264+ endif ()
265+
264266if (CBLAS)
265267 add_subdirectory (CBLAS)
266268endif ()
@@ -288,7 +290,7 @@ if(LAPACK_LIBRARIES)
288290 check_language(Fortran)
289291 if (CMAKE_Fortran_COMPILER)
290292 enable_language (Fortran)
291- include (CheckFortranFunctionExists)
293+ incldude (CheckFortranFunctionExists)
292294 set (CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} )
293295 # Check if new routine of 3.4.0 is in LAPACK_LIBRARIES
294296 CHECK_FORTRAN_FUNCTION_EXISTS("dgeqrt" LATESTLAPACK_FOUND)
You can’t perform that action at this time.
0 commit comments