diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d673d3..6c4dd9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,10 @@ if(HDF5_ROOTDIR) endif(HDF5_ROOTDIR) include(FindHDF5) +include(FindPkgConfig) + +pkg_check_modules(FFTW3 fftw3>=3.3) +pkg_check_modules(EIGEN3 eigen3) include(FindPackageHandleStandardArgs) set(NETCDF_FIND_REQUIRED TRUE) diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index b170c7f..a98ccdd 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -1,5 +1,5 @@ SET(tolink CosmoTool ${CosmoTool_LIBS}) -include_directories(${CMAKE_SOURCE_DIR}/src ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH}) +include_directories(${CMAKE_SOURCE_DIR}/src ${FFTW3_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH}) add_executable(testBQueue testBQueue.cpp) target_link_libraries(testBQueue ${tolink}) @@ -39,3 +39,8 @@ target_link_libraries(testAlgo ${tolink}) add_executable(testBSP testBSP.cpp) target_link_libraries(testBSP ${tolink}) + +if (FFTW3_FOUND AND EIGEN3_FOUND) + add_executable(test_fft_calls test_fft_calls) + target_link_libraries(test_fft_calls ${tolink} ${FFTW3_LIBRARIES}) +endif (FFTW3_FOUND AND EIGEN3_FOUND) diff --git a/sample/test_fft_calls.cpp b/sample/test_fft_calls.cpp new file mode 100644 index 0000000..35eeb12 --- /dev/null +++ b/sample/test_fft_calls.cpp @@ -0,0 +1,12 @@ +#include "fourier/euclidian.hpp" + +using namespace CosmoTool; + +int main() +{ + EuclidianFourierTransform_2d dft(128,128,1.0,1.0); + + dft.realSpace().eigen().setRandom(); + dft.analysis(); + return 0; +}