Verify MD5 sum for FFTW download
[alexxy/gromacs.git] / src / contrib / fftw / fftw-download.cmake.cmakein
1 # Custom download script for Gromacs external FFTW build.
2
3 # Mimics a similar script generated by CMake ExternalProject package, but
4 # does not verify the MD5 sum (which would give confusing error messages if the
5 # download fails).
6 message(STATUS "downloading...
7      src='@remote_url@'
8      dest='@local_path@'")
9 file(DOWNLOAD "@remote_url@" "@local_path@"
10      SHOW_PROGRESS STATUS status LOG log)
11 list(GET status 0 status_code)
12 list(GET status 1 status_string)
13 if (NOT status_code EQUAL 0)
14   message(FATAL_ERROR "error: downloading '@remote_url@' failed
15      status_code: ${status_code}
16      status_string: ${status_string}
17      log: ${log}")
18 endif()
19 message(STATUS "downloading... done")