ComputationalRadiationPhysics / clara2

Clara2 - a parallel classical radiation calculator based on Liénard-Wiechert potentials
GNU General Public License v3.0
13 stars 9 forks source link

switch to cmake #98

Open PrometheusPi opened 6 years ago

PrometheusPi commented 6 years ago

As suggested by @psychocoderHPC and @ax3l switching to a cmake (3.0+) approach for building clara2 would ease the setup with module systems and would allow building on Windows and OSX machines as well.

Main issue with cmake is that fftw has no default finder.

ax3l commented 6 years ago

Projects with modern CMake 3 support to take code from:

Feel free to ping me on PRs if you want a review.

For FFTW, just use a FindFFTW.cmake module from somewhere on the internet that looks promising, e.g.:

and use it by setting

# own modules for find_packages
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ ${CMAKE_MODULE_PATH})

in your CMakeLists.txt. Be aware that such files might need to be installed as well for a Clara2Config.cmake (where it might be called again during find_dependency).