<commit_before>--- CMakeLists.txt	2016-06-16 12:16:11.000000000 -0400
+++ CMakeLists_New.txt	2017-02-13 22:43:10.000000000 -0500
@@ -103,9 +103,25 @@
   set(ARMA_USE_LAPACK true)
   set(ARMA_USE_BLAS   true)
   
-  set(ARMA_LIBS ${ARMA_LIBS} "-framework Accelerate")  # or "-framework accelerate" ?
-  message(STATUS "MacOS X detected. Added '-framework Accelerate' to compiler flags")
+  # set(ARMA_LIBS ${ARMA_LIBS} "-framework Accelerate")  # or "-framework accelerate" ?
+  # message(STATUS "MacOS X detected. Added '-framework Accelerate' to compiler flags")
+
+  include(ARMA_FindOpenBLAS)
+  include(ARMA_FindLAPACK)
+
+  message(STATUS "OpenBLAS_FOUND = ${OpenBLAS_FOUND}")
+  message(STATUS "  LAPACK_FOUND = ${LAPACK_FOUND}"  )
   
+  if(OpenBLAS_FOUND)
+    set(ARMA_USE_BLAS true)
+    set(ARMA_LIBS ${ARMA_LIBS} ${OpenBLAS_LIBRARIES})
+  endif()
+  
+  if(LAPACK_FOUND)
+    set(ARMA_USE_LAPACK true)
+    set(ARMA_LIBS ${ARMA_LIBS} ${LAPACK_LIBRARIES})
+  endif()
+
   if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
     message(STATUS "Clang compiler on MacOS X detected. Added '-stdlib=libc++' to compiler flags")<commit_msg>modify OS X patch to avoid linking to Accelerate LAPACK<commit_after>--- CMakeLists.txt	2016-06-16 12:16:11.000000000 -0400
+++ CMakeLists_New.txt	2017-03-04 15:18:00.000000000 -0500
@@ -100,12 +100,21 @@
   
   set(ARMA_OS macos)
   
-  set(ARMA_USE_LAPACK true)
-  set(ARMA_USE_BLAS   true)
+  # set(ARMA_USE_LAPACK true)
+  # set(ARMA_USE_BLAS   true)
   
-  set(ARMA_LIBS ${ARMA_LIBS} "-framework Accelerate")  # or "-framework accelerate" ?
-  message(STATUS "MacOS X detected. Added '-framework Accelerate' to compiler flags")
+  # set(ARMA_LIBS ${ARMA_LIBS} "-framework Accelerate")  # or "-framework accelerate" ?
+  # message(STATUS "MacOS X detected. Added '-framework Accelerate' to compiler flags")
   
+  include(ARMA_FindOpenBLAS)
+  message(STATUS "OpenBLAS_FOUND = ${OpenBLAS_FOUND}")
+
+  if(OpenBLAS_FOUND)
+    set(ARMA_USE_BLAS true)
+    set(ARMA_USE_LAPACK true)  # OpenBLAS includes LAPACK in same library
+    set(ARMA_LIBS ${ARMA_LIBS} ${OpenBLAS_LIBRARIES})
+  endif()
+
   if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
     message(STATUS "Clang compiler on MacOS X detected. Added '-stdlib=libc++' to compiler flags")
{'fraction_non_alphanumeric': 0.14078674948240166, 'fraction_numerical': 0.0525879917184265, 'mean_word_length': 4.631701631701632, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3085041', 'n_tokens_mistral': 1080, 'n_tokens_neox': 951, 'n_words': 191}