-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify current/future cmake support #307
Comments
Here is my view on this issue. autotools is and will remain the primary mechanism for compiling FFTW on any system that has a unix-like shell. It is the only mechanism that we personally use. cmake support was contributed by other people, to whom we are thankful. We incorporated it because it simplifies building FFTW on Windows, which has historically been a problem for decades. We (as authors of Free Software) have no appetite whatsoever to touch Windows, and keeping the cmake support around is extra work for us. Nevertheless, not adding cmake support makes the life of other people harder at no benefit to us, so we added cmake support. Building FFTW is complicated because a substantial majority of the C code that comprises FFTW is automatically generated, and code generation used to take a long time. Many years ago (before github was invented) we settled on a distribution model where the code-generation stage is performed by us once and for all, and the final user only needs a C compiler and a unix shell to compile FFTW. In this model, the primary distribution mechanism is a tarball downloaded from fftw.org, and github is a secondary distribution mechanism not really meant to be used by civilians. The code generation machinery is currently only supported by autotools. Migrating this machinery to cmake would not solve any problem that we currently have, and thus I am disinclined to do any work on this front. |
I would say that one disadvantage of not migrating to more standard toolchains is the gatekeeping of new colaborators and the lack of IDE support. For example, easy CI support and maintenance. Doing a preliminary scan of the code that is generated, there doesn't seem to be anything majorly complicated that cannot be done with macros (but honestly C++ templates would be significantly simpler, and migrating would not be difficult using a simple regex substitution). The code generation seems to be just calling some perl scripts, which can be done straightforwardly in cmake. If there are more complicated generations, please elaborate more on how the code-generation works. |
Um.... see the paper A Fast Fourier Transform Compiler. C++ templates are turing complete, and so in principle could do anything, but it is unlikely to be "simpler" to do algebraic pattern matching and simplification in templates than using a language (OCaml) designed for those tasks. In any case, this isn't going to happen. Definitely the code-generation programs could be invoked from cmake, but as Matteo wrote above this doesn't really interest us for any practical reason at the moment. |
Let me know if I understand this correctly:
The place where I was thinking would be a good idea to port to C++ is in substituting the macros, e.g. the The lack of native cmake integration is unfortunate because for users it would greatly simplify their implementation:
|
I have no interest in continuing this conversation. The last one leaving please close the ticket. |
@LecrisUT, the API of FFTW needs to be based on C, not C++, even though it should be callable from C++. This is partly for technical reasons — it is vastly easier to call C libraries from other languages than it is to call C++ libraries. (Various authors have layered more "native-feeling" C++ interfaces on top of FFTW and they are welcome to do so, along with the interfaces to FFTW from Python, Julia, R, Rust, etcetera.) |
The wording in the readme is rather contradictory with how the current status of the project is. I.e.:
find_pacakge()
The file FFTW3LibraryDepends.cmake is missing #130The text was updated successfully, but these errors were encountered: