1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-20 04:48:10 +00:00
nixpkgs/pkgs/applications/science/math/gmsh/CMakeLists.txt.patch
Christopher Lübbemeier ac4903284c gmsh: init at 2.12.0
2016-06-09 18:54:26 +02:00

38 lines
1.7 KiB
Diff

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -324,25 +324,16 @@
set_config_option(HAVE_BLAS "Blas(IntelMKL)")
set_config_option(HAVE_LAPACK "Lapack(IntelMKL)")
else(LAPACK_LIBRARIES)
- # on Linux also try to find ATLAS without a Fortran compiler, because
- # cmake ships with a buggy FindBLAS e.g. on Ubuntu Lucid Lynx
- set(ATLAS_LIBS_REQUIRED lapack f77blas cblas atlas)
- find_all_libraries(LAPACK_LIBRARIES ATLAS_LIBS_REQUIRED "" "")
+ # try with generic names
+ set(GENERIC_LIBS_REQUIRED lapack blas pthread)
+ find_all_libraries(LAPACK_LIBRARIES GENERIC_LIBS_REQUIRED "" "")
if(LAPACK_LIBRARIES)
- set_config_option(HAVE_BLAS "Blas(ATLAS)")
- set_config_option(HAVE_LAPACK "Lapack(ATLAS)")
- else(LAPACK_LIBRARIES)
- # try with generic names
- set(GENERIC_LIBS_REQUIRED lapack blas pthread)
- find_all_libraries(LAPACK_LIBRARIES GENERIC_LIBS_REQUIRED "" "")
- if(LAPACK_LIBRARIES)
- set_config_option(HAVE_BLAS "Blas(Generic)")
- set_config_option(HAVE_LAPACK "Lapack(Generic)")
- find_library(GFORTRAN_LIB gfortran)
- if(GFORTRAN_LIB)
- list(APPEND LAPACK_LIBRARIES ${GFORTRAN_LIB})
- endif(GFORTRAN_LIB)
- endif(LAPACK_LIBRARIES)
+ set_config_option(HAVE_BLAS "Blas(Generic)")
+ set_config_option(HAVE_LAPACK "Lapack(Generic)")
+ find_library(GFORTRAN_LIB gfortran)
+ if(GFORTRAN_LIB)
+ list(APPEND LAPACK_LIBRARIES ${GFORTRAN_LIB})
+ endif(GFORTRAN_LIB)
endif(LAPACK_LIBRARIES)
endif(LAPACK_LIBRARIES)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")