Fix Cygwin+Shared-Libs+FFTW
authorRoland Schulz <roland@utk.edu>
Thu, 10 Jul 2014 01:11:50 +0000 (21:11 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 24 Jul 2014 17:16:37 +0000 (19:16 +0200)
Cygwin doesn't have or require fPIC

Change-Id: If1af6f070e2cd0457f429a155e92014af51c0c33

cmake/FindFFTW.cmake

index 09343ebc5c964ed1022b955e5e62c39e99139688..326805a163df244547184e715a4f0e03ff61b9d0 100644 (file)
@@ -124,7 +124,7 @@ if (${FFTW}_FOUND)
     endif()
   endforeach()
   #Verify FFTW is compiled with fPIC (necessary for shared libraries)
-  if (CMAKE_OBJDUMP AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND BUILD_SHARED_LIBS)
+  if (CMAKE_OBJDUMP AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND BUILD_SHARED_LIBS AND NOT CYGWIN)
       execute_process(COMMAND ${CMAKE_OBJDUMP} --reloc ${${FFTW}_LIBRARY} OUTPUT_VARIABLE ${FFTW}_OBJDUMP)
       if (${${FFTW}_OBJDUMP} MATCHES "R_X86_64" #Should always be true for static libraries. Checks that objdump works properly and that the library isn't dynamic
               AND NOT ${${FFTW}_OBJDUMP} MATCHES "R_X86_64_PLT32")