Skip to content

Commit

Permalink
[cmake] Replace using wget with file(DOWNLOAD)
Browse files Browse the repository at this point in the history
This helps reduce the dependency on wget at cmake configure time which is
non-standard for OSX.
  • Loading branch information
vgvassilev committed Dec 27, 2023
1 parent 3e66282 commit b530ba8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 26 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ if (jemalloc)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ljemalloc -L ${JEMALLOC_LIBRARY_DIR}")
endif()

find_program(WGET_BIN wget)
if (NOT WGET_BIN)
message(FATAL_ERROR "The program wget was not found in your system. Please run ./prerequisites.sh again before calling cmake.")
endif()

if (APPLE)
set(NOPYENV YES)
endif()
Expand Down
5 changes: 0 additions & 5 deletions cmake/UseBioDynaMo.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@ if (jemalloc)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ljemalloc -L ${JEMALLOC_LIBRARY_DIR}")
endif()

find_program(WGET_BIN wget)
if (NOT WGET_BIN)
message(FATAL_ERROR "The program wget was not found in your system. Please run ./prerequisites.sh again before calling cmake.")
endif()

# In order to correctly compile and link the multi simulation manager with MPI,
# you need to set CMAKE_[CXX|C]_COMPILER to [mpic++|mpicc]
# We still however need to explicitly add the mpi.h include path to our include_directories
Expand Down
11 changes: 2 additions & 9 deletions cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -533,15 +533,8 @@ Unset the environment variable BDM_LOCAL_LFS to download the file.")
endif()
else()
# Download the file
if (${DETECTED_OS} MATCHES "centos.*")
execute_process(COMMAND ${WGET_BIN} --progress=bar:force
-O ${FULL_TAR_PATH} ${URL}
RESULT_VARIABLE DOWNLOAD_STATUS_CODE)
else()
execute_process(COMMAND ${WGET_BIN} -nv --show-progress --progress=bar:force:noscroll
-O ${FULL_TAR_PATH} ${URL}
RESULT_VARIABLE DOWNLOAD_STATUS_CODE)
endif()
file(DOWNLOAD ${URL} ${FULL_TAR_PATH} SHOW_PROGRESS STATUS DOWNLOAD_STATUS)
list(GET DOWNLOAD_STATUS 0 DOWNLOAD_STATUS_CODE)
if (NOT ${DOWNLOAD_STATUS_CODE} EQUAL 0)
message( FATAL_ERROR "\nERROR: We were unable to download:\
${URL}\n\
Expand Down
9 changes: 3 additions & 6 deletions doc/user_guide/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ BioDynaMo provides also an automated procedure to install all the needed librari

### Required Packages

* **wget**: Retrieves files from the web
* **curl**: Command line tool for transferring data with URL syntax
* **cmake**: Set of tools for automate building, testing of software
* **make**: Build automation tool
Expand Down Expand Up @@ -74,7 +73,7 @@ BioDynaMo provides also an automated procedure to install all the needed librari

```bash
sudo apt-get update
sudo apt-get install -y wget curl make gcc g++ \
sudo apt-get install -y curl make gcc g++ \
libblas-dev liblapack-dev libopenmpi-dev libomp5 libomp-dev \
libnuma-dev freeglut3-dev libpthread-stubs0-dev

Expand Down Expand Up @@ -123,7 +122,6 @@ sudo apt-get install -y kcov

* **epel-release**: Provides a set of additional packages for Enterprise Linux
* **ius-release**: Provides RPM packages for newer software versions for for Enterprise Linux distributions
* **wget**: Retrieves files from the web
* **cmake**: Set of tools for automate building, testing of software
* **libXt-devel**: Basic library for developing X11
* **libXext-devel**: Library which contains a handful of X11 extensions
Expand Down Expand Up @@ -169,7 +167,7 @@ sudo apt-get install -y kcov
sudo yum update -y
sudo yum -y install centos-release-scl epel-release
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm
sudo yum -y install wget libXt-devel libXext-devel \
sudo yum -y install libXt-devel libXext-devel \
devtoolset-8-gcc* numactl-devel \
openmpi3-devel freeglut-devel git

Expand Down Expand Up @@ -230,7 +228,6 @@ Requirements to build on macOS are:
* **libomp**: Development files for OpenMP (API for multiprocessor programming)
* **open-mpi**: Development files for OpenMP (API for multiprocessor programming)
* **python@3.9**: Python interpreter
* **wget**: Retrieves files from the web
* **cmake**: Set of tools for automate building, testing of software
* **ninja**: Ninja is a small build system with a focus on speed
* **bash**: Recent version of bash shell
Expand All @@ -251,7 +248,7 @@ Requirements to build on macOS are:

```bash
brew update; brew upgrade
brew install libomp open-mpi python@3.9 wget cmake ninja bash tbb qt@5
brew install libomp open-mpi python@3.9 cmake ninja bash tbb qt@5
```

#### Optional Packages
Expand Down
1 change: 0 additions & 1 deletion util/installation/osx/package_list_required
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ tbb
libomp
open-mpi
python@3.9
wget
cmake
ninja
bash
Expand Down

0 comments on commit b530ba8

Please sign in to comment.