From 4e7e6ae4a3e2e0519f0b90c9f1cecc28db5fea28 Mon Sep 17 00:00:00 2001
From: Martin Beseda <martin.beseda@vsb.cz>
Date: Tue, 19 Feb 2019 06:47:01 +0100
Subject: [PATCH] FIX: Trying to fix CI...

---
 CMakeLists.txt         | 2 +-
 DownloadOpenBLAS.cmake | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3470b542..58f587b3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ find_package(LAPACK)
 find_package(BLAS)
 if(NOT LAPACK_FOUND AND NOT BLAS_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
     # Download and build OpenBLAS locally
-     message("LAPACK nor BLAS were found - OpenBLAS will be downloaded and built.")
+    message("LAPACK nor BLAS were found - OpenBLAS will be downloaded and built.")
     include(DownloadOpenBLAS)
 endif()
 
diff --git a/DownloadOpenBLAS.cmake b/DownloadOpenBLAS.cmake
index 17fb2315..92cfcef3 100644
--- a/DownloadOpenBLAS.cmake
+++ b/DownloadOpenBLAS.cmake
@@ -22,7 +22,7 @@ FetchContent_Populate(OpenBLAS)
 # Build OpenBLAS #
 ##################
 execute_process(
-    COMMAND cmake .
+    COMMAND cmake -j ${N_CORES} .
     WORKING_DIRECTORY ${OPENBLAS_LOCAL_PATH}
     RESULT_VARIABLE rv
 )
@@ -31,7 +31,7 @@ if(NOT rv STREQUAL "0")
 endif()
 
 execute_process(
-    COMMAND cmake --build .
+    COMMAND cmake -j ${N_CORES} --build .
     WORKING_DIRECTORY ${OPENBLAS_LOCAL_PATH}
     RESULT_VARIABLE rv
 )
@@ -39,7 +39,9 @@ if(NOT rv STREQUAL "0")
     message("OpenBLAS build: cmake --build: ${rv}")
 endif()
 
-find_package(BLAS)
+find_package(BLAS
+        HINT
+        external_dependencies/OpenBLAS)
 
 if(NOT BLAS_FOUND)
     message(FATAL_ERROR "OpenBLAS was not downloaded successfully!")
-- 
GitLab