Open ax3l opened 3 years ago
On Windows (and with some compilers like ICC/ICX), libm is added by the compiler.
libm
With FFTW3 3.3.9 on Windows, I observed that on a CMake-based install, the generated .pc file adds libm unconditionally to the link dependencies. https://github.com/FFTW/fftw3/blob/fftw-3.3.9/fftw.pc.in#L10 https://github.com/FFTW/fftw3/blob/fftw-3.3.9/CMakeLists.txt#L409
.pc
This is a bug with MSVC on Windows and fails downstream linking, e.g. when picked up with:
find_package(PkgConfig REQUIRED QUIET) pkg_check_modules(fftw3 REQUIRED IMPORTED_TARGET fftw3) target_link_libraries(mytarget PkgConfig::fftw3)
Changing the unconditional search for libm in CMakeLists.txt by passing -DLIBM_LIBRARY=LIBM-NOTFOUND helps with the Config.cmake package, but the .pc package is then still broken: https://github.com/FFTW/fftw3/blob/fftw-3.3.9/CMakeLists.txt#L109 https://github.com/conda-forge/fftw-feedstock/pull/75
CMakeLists.txt
-DLIBM_LIBRARY=LIBM-NOTFOUND
Config.cmake
cc @junghans
On Windows (and with some compilers like ICC/ICX),
libm
is added by the compiler.With FFTW3 3.3.9 on Windows, I observed that on a CMake-based install, the generated
.pc
file addslibm
unconditionally to the link dependencies. https://github.com/FFTW/fftw3/blob/fftw-3.3.9/fftw.pc.in#L10 https://github.com/FFTW/fftw3/blob/fftw-3.3.9/CMakeLists.txt#L409This is a bug with MSVC on Windows and fails downstream linking, e.g. when picked up with:
Changing the unconditional search for
libm
inCMakeLists.txt
by passing-DLIBM_LIBRARY=LIBM-NOTFOUND
helps with theConfig.cmake
package, but the.pc
package is then still broken: https://github.com/FFTW/fftw3/blob/fftw-3.3.9/CMakeLists.txt#L109 https://github.com/conda-forge/fftw-feedstock/pull/75cc @junghans