From: Roland Schulz Date: Thu, 10 Jul 2014 01:11:50 +0000 (-0400) Subject: Fix Cygwin+Shared-Libs+FFTW X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=cadf8992ff322ee5bf8b2d21491b156bf6afdab3;p=alexxy%2Fgromacs.git Fix Cygwin+Shared-Libs+FFTW Cygwin doesn't have or require fPIC Change-Id: If1af6f070e2cd0457f429a155e92014af51c0c33 --- diff --git a/cmake/FindFFTW.cmake b/cmake/FindFFTW.cmake index 09343ebc5c..326805a163 100644 --- a/cmake/FindFFTW.cmake +++ b/cmake/FindFFTW.cmake @@ -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")