From 86dc4bd2493060e26c3cc169a7383521f0dadf22 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 27 Feb 2014 15:30:21 +0100 Subject: [PATCH] Fixed default arguments in healpix_transform. Fixed fftw detection in CMake --- CMakeLists.txt | 4 ++++ sample/CMakeLists.txt | 8 +++++++- src/fourier/details/healpix_transform.hpp | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4888a4..7160419 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,10 @@ pkg_check_modules(FFTW3 fftw3>=3.3) pkg_check_modules(FFTW3F fftw3f>=3.3) pkg_check_modules(EIGEN3 eigen3) + +find_library(FFTW3F_LIBRARY_FULL fftw3f PATHS ${FFTW3F_LIBDIR} NO_DEFAULT_PATH) +find_library(FFTW3_LIBRARY_FULL fftw3 PATHS ${FFTW3_LIBDIR} NO_DEFAULT_PATH) + include(FindPackageHandleStandardArgs) set(NETCDF_FIND_REQUIRED TRUE) set(GSL_FIND_REQUIRED TRUE) diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index 969480c..64bb51f 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -48,8 +48,14 @@ add_executable(testBSP testBSP.cpp) target_link_libraries(testBSP ${tolink}) if (FFTW3_FOUND AND FFTW3F_FOUND AND EIGEN3_FOUND) + IF (FFTW3F_LIBRARY_FULL) + SET(FFTW3_LIB ${FFTW3F_LIBRARY_FULL}) + ENDIF (FFTW3F_LIBRARY_FULL) + IF (FFTW3_LIBRARY_FULL) + SET(FFTW3_LIB ${FFTW3_LIB} ${FFTW3_LIBRARY_FULL}) + ENDIF (FFTW3_LIBRARY_FULL) add_executable(test_fft_calls test_fft_calls.cpp) - target_link_libraries(test_fft_calls ${tolink} ${FFTW3_LIBRARIES} ${FFTW3F_LIBRARIES}) + target_link_libraries(test_fft_calls ${tolink} ${FFTW3_LIB}) endif (FFTW3_FOUND AND FFTW3F_FOUND AND EIGEN3_FOUND) if (ENABLE_SHARP AND SHARP_LIBRARY AND SHARP_INCLUDE_PATH AND EIGEN3_FOUND) diff --git a/src/fourier/details/healpix_transform.hpp b/src/fourier/details/healpix_transform.hpp index d3f7927..37e79e8 100644 --- a/src/fourier/details/healpix_transform.hpp +++ b/src/fourier/details/healpix_transform.hpp @@ -67,7 +67,7 @@ namespace CosmoTool sharp_make_triangular_alm_info (Lmax, Mmax, 1, &ainfo); } - HealpixFourierTransform(long nSide, long Lmax, long Mmax, int iterate = 0, const std::valarray& weights ) + HealpixFourierTransform(long nSide, long Lmax, long Mmax, int iterate, const std::valarray& weights ) : realMap(nSide), fourierMap(Lmax, Mmax), ainfo(0), ginfo(0), m_iterate(iterate) { sharp_make_weighted_healpix_geom_info (nSide, 1, &weights[0], &ginfo);