Fix GMX_BUILD_OWN_FFTW_URL CMake cache entry type
authorSzilárd Páll <pall.szilard@gmail.com>
Mon, 9 Apr 2018 17:23:03 +0000 (19:23 +0200)
committerSzilárd Páll <pall.szilard@gmail.com>
Mon, 17 Dec 2018 21:35:54 +0000 (22:35 +0100)
The type of the GMX_BUILD_OWN_FFTW_URL cache entry was set to "PATH"
and as a result CMake was expecting its content to be a directory.
This commit changes the type to "STRING" and as a result the '////'
workaround in the default fftw URL and custom URLs can now be passed on
the command line which previously did not work as CMake interpreted most
inputs as relative file system paths and converted them to absolute
ones.

Change-Id: I6ed3920d7816b686a031c1a3aee5acd25d7b4692

src/external/build-fftw/CMakeLists.txt

index fbb1293f5011cfa4fe5b9e591b6973d8ca636027..15e630b206a1d7c1e0dff59fef610b631e0a379b 100644 (file)
@@ -93,9 +93,8 @@ endif()
 
 # Machinery for running the external project
 set(EXTERNAL_FFTW_VERSION 3.3.8)
-# cmake make eats slashes //// -> //
 set(GMX_BUILD_OWN_FFTW_URL
-    "http:////www.fftw.org/fftw-${EXTERNAL_FFTW_VERSION}.tar.gz" CACHE PATH
+    "http://www.fftw.org/fftw-${EXTERNAL_FFTW_VERSION}.tar.gz" CACHE STRING
     "URL from where to download fftw (use an absolute path when offline, adjust GMX_BUILD_OWN_FFTW_MD5 if downloading other version than ${EXTERNAL_FFTW_VERSION})")
 set(GMX_BUILD_OWN_FFTW_MD5 8aac833c943d8e90d51b697b27d4384d CACHE STRING
     "Expected MD5 hash for the file at GMX_BUILD_OWN_FFTW_URL")
@@ -106,6 +105,7 @@ mark_as_advanced(GMX_BUILD_OWN_FFTW_URL GMX_BUILD_OWN_FFTW_MD5)
 # ourselves so that MD5 sum is not verified there, and then pass a local file
 # as the URL to ExternalProject.  This way, ExternalProject still verifies the
 # MD5 sum with a proper message if that fails.
+# TODO remove this when we require CMake 3.5+
 set(url "${GMX_BUILD_OWN_FFTW_URL}")
 # Determine whether we are actually downloading (this matches the conditions in
 # ExternalProject).  ExternalProject works as expected if passed a local file.