diff options
-rw-r--r-- | Help/release/dev/find-blas-lapack-OpenBLAS.rst | 5 | ||||
-rw-r--r-- | Modules/CPack.OSXX11.Info.plist.in | 2 | ||||
-rw-r--r-- | Modules/FindBLAS.cmake | 20 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 15 | ||||
-rw-r--r-- | Modules/MacOSXBundleInfo.plist.in | 2 | ||||
-rw-r--r-- | Source/CMakeLists.txt | 15 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackDragNDropGenerator.cxx | 6 | ||||
-rw-r--r-- | Templates/AppleInfo.plist | 2 |
9 files changed, 57 insertions, 12 deletions
diff --git a/Help/release/dev/find-blas-lapack-OpenBLAS.rst b/Help/release/dev/find-blas-lapack-OpenBLAS.rst new file mode 100644 index 0000000..893422a --- /dev/null +++ b/Help/release/dev/find-blas-lapack-OpenBLAS.rst @@ -0,0 +1,5 @@ +find-blas-lapack-OpenBLAS +------------------------- + +* The :module:`FindBLAS` and :module:`FindLAPACK` modules learned to + support `OpenBLAS <http://www.openblas.net>`__. diff --git a/Modules/CPack.OSXX11.Info.plist.in b/Modules/CPack.OSXX11.Info.plist.in index 851b67b..23a1483 100644 --- a/Modules/CPack.OSXX11.Info.plist.in +++ b/Modules/CPack.OSXX11.Info.plist.in @@ -41,8 +41,6 @@ <string>@CPACK_APPLE_GUI_BUNDLE_VERSION@</string> <key>CSResourcesFileMapped</key> <true/> - <key>LSRequiresCarbon</key> - <true/> <key>NSHumanReadableCopyright</key> <string>@CPACK_APPLE_GUI_COPYRIGHT@</string> </dict> diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 416b666..546ada1 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -30,9 +30,9 @@ # BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK # # ######### ## List of vendors (BLA_VENDOR) valid in this module # -# Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 -# (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread -# model, lp64 model), # Intel10_64lp_seq (intel mkl v10 64 +# Goto,OpenBLAS,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL, +# Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit, +# lp thread model, lp64 model), # Intel10_64lp_seq (intel mkl v10 64 # bit,sequential code, lp64 model), # Intel( older versions of mkl 32 # and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic C/CXX should be # enabled to use Intel mkl @@ -172,6 +172,20 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") endif() endif () +if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + # OpenBLAS (http://www.openblas.net) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "openblas" + "" + ) + endif() +endif () + if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") if(NOT BLAS_LIBRARIES) # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index b11edc3..2708de0 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -31,7 +31,7 @@ # BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK # # ## List of vendors (BLA_VENDOR) valid in this module # Intel(mkl), -# ACML,Apple, NAS, Generic +# OpenBLAS, ACML,Apple, NAS, Generic #============================================================================= # Copyright 2007-2009 Kitware, Inc. @@ -181,6 +181,19 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") endif() endif () +if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "openblas" + "${BLAS_LIBRARIES}" + "" + ) + endif() +endif () #acml lapack if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All") diff --git a/Modules/MacOSXBundleInfo.plist.in b/Modules/MacOSXBundleInfo.plist.in index a466dc7..a4009bc 100644 --- a/Modules/MacOSXBundleInfo.plist.in +++ b/Modules/MacOSXBundleInfo.plist.in @@ -28,8 +28,6 @@ <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> <key>CSResourcesFileMapped</key> <true/> - <key>LSRequiresCarbon</key> - <true/> <key>NSHumanReadableCopyright</key> <string>${MACOSX_BUNDLE_COPYRIGHT}</string> </dict> diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 8dd58af..467b692 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -724,7 +724,20 @@ endif() add_library(CPackLib ${CPACK_SRCS}) target_link_libraries(CPackLib CMakeLib) if(APPLE) - target_link_libraries(CPackLib "-framework CoreServices") + # Some compilers produce errors in the CoreServices framework headers. + # Ideally such errors should be fixed by either the compiler vendor + # or the framework source, but we try to workaround it and build anyway. + # If it does not work, build with reduced functionality and warn. + check_include_file("CoreServices/CoreServices.h" HAVE_CoreServices) + if(HAVE_CoreServices) + set_property(SOURCE CPack/cmCPackDragNDropGenerator.cxx PROPERTY COMPILE_DEFINITIONS HAVE_CoreServices) + target_link_libraries(CPackLib "-framework CoreServices") + else() + message(WARNING "This compiler does not appear to support\n" + " #include <CoreServices/CoreServices.h>\n" + "Some CPack functionality may be limited.\n" + "See CMakeFiles/CMakeError.log for details of the failure.") + endif() endif() if(APPLE) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 584f207..f61e30e 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 5) -set(CMake_VERSION_PATCH 20160319) +set(CMake_VERSION_PATCH 20160322) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 521b395..d6de77d 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -22,10 +22,12 @@ #include <CoreFoundation/CoreFoundation.h> +#ifdef HAVE_CoreServices // For the old LocaleStringToLangAndRegionCodes() function, to convert // to the old Script Manager RegionCode values needed for the 'LPic' data // structure used for generating multi-lingual SLAs. #include <CoreServices/CoreServices.h> +#endif static const char* SLAHeader = "data 'LPic' (5000) {\n" @@ -643,9 +645,11 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, kCFStringEncodingMacRoman); LangCode lang = 0; RegionCode region = 0; +#ifdef HAVE_CoreServices OSStatus err = LocaleStringToLangAndRegionCodes(iso_language_cstr, &lang, ®ion); if (err != noErr) +#endif { cmCPackLogger(cmCPackLog::LOG_ERROR, "No language/region code available for " << iso_language_cstr @@ -653,10 +657,12 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, free(iso_language_cstr); return 0; } +#ifdef HAVE_CoreServices free(iso_language_cstr); header_data.push_back(region); header_data.push_back(i); header_data.push_back(0); +#endif } ofs << "data 'LPic' (5000) {\n"; ofs << std::hex << std::uppercase << std::setfill('0'); diff --git a/Templates/AppleInfo.plist b/Templates/AppleInfo.plist index 1f68ccf..3445e53 100644 --- a/Templates/AppleInfo.plist +++ b/Templates/AppleInfo.plist @@ -28,8 +28,6 @@ <string>${APPLE_GUI_BUNDLE_VERSION}</string> <key>CSResourcesFileMapped</key> <true/> - <key>LSRequiresCarbon</key> - <true/> <key>NSHumanReadableCopyright</key> <string>${APPLE_GUI_COPYRIGHT}</string> </dict> |