Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ find_package(Boost COMPONENTS program_options timer chrono thread)
if (NOT ${Boost_FOUND})
# bash file that downloads and install boost 1_68_0, the name need to match
# BOOST_DIR variable
execute_process(COMMAND ${TOOLS_DIR}/download_boost.${SCRIPT_EXTENSION})
execute_process(COMMAND ${TOOLS_DIR}/download_boost.${SCRIPT_EXTENSION} EXIT_CODE exit_code)
if (NOT exit_code EQUAL "0")
message(FATAL_ERROR "The installation of boost has failed")
endif()
find_package(Boost REQUIRED COMPONENTS program_options timer chrono thread)
endif()
set(LIBS_INCLUDES ${Boost_INCLUDE_DIRS})
Expand Down Expand Up @@ -226,10 +229,13 @@ if (${ENABLE_OPENBLAS})
add_compile_definitions(ENABLE_OPENBLAS)
#OpenBLAS
if(NOT EXISTS "${OPENBLAS_DIR}/installed/lib/libopenblas.a")
message("Can't find open blas, installing. If open blas is isntalled please use the OPENBLAS_DIR parameter to pass the path")
message("Can't find openblas, installing. If openblas is installed please use the OPENBLAS_DIR parameter to pass the path")
if (${OPENBLAS_DIR} STREQUAL ${OPENBLAS_DEFAULT_DIR})
message("installing openblas")
execute_process(COMMAND ${TOOLS_DIR}/download_openBLAS.sh)
execute_process(COMMAND ${TOOLS_DIR}/download_openBLAS.sh EXIT_CODE exit_code)
if (NOT exit_code EQUAL "0")
message(FATAL_ERROR "The installation of openblas has failed")
endif()
else()
message(FATAL_ERROR "Can't find openblas in the supplied directory")
endif()
Expand Down
2 changes: 1 addition & 1 deletion tools/download_boost.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
curdir=$pwd
mydir="${0%/*}"

Expand Down
3 changes: 2 additions & 1 deletion tools/download_openBLAS.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/bin/bash -e

curdir=$pwd
mydir="${0%/*}"

Expand Down