Skip to content
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

FFTW3 and ACE location can only be set via environment variable #147

Open
KrisThielemans opened this issue Oct 7, 2018 · 3 comments
Open
Assignees

Comments

@KrisThielemans
Copy link
Member

KrisThielemans commented Oct 7, 2018

FindFFTW3.cmake (supplied in Gadgetron, ISMRMRD and SIRF, which are all identical) use $ENV{FFTW_ROOT_DIR}. Therefore, setting the FFTW_ROOT_DIR CMake variable has no effect. Instead, when using USE_SYSTEM_FFTW3=OFF, the user has to set the environment variable before building the superbuild (note that setting it when running CMake the first time will not have any effect).

The same holds for ACE_ROOT.

@evgueni-ovtchinnikov , please add this to our installation documentation (wike etc) and close this issue when done.

Notes

  • As CMake doesn't come with FFTW3 support, it is currently necessary to have FindFFTW3.cmake reproduced 3 times. sigh.

  • This is poorely documented in FindFFTW3.cmake, which could be fixed by a PR to Gadgetron, ISMRMRD and SIRF. Similarly, we could fix FindFFTW3.cmake to also use the CMake variable.

  • I have tried to use set(ENV{FFTW3_ROOT_DIR} bloe)
    in our External_FindFFTW.cmake. This however doesn't pass the environment variable to the CMake instances for Gadgetron etc.

  • By the way, when using USE_SYSTEM_FFTW3=OFF, CMake currently does find our own installation even if the FFTW3_ROOT_DIR env variable (as find_library etc give precedence to MAKE_PREFIX_PATH over HINTS ).

@KrisThielemans KrisThielemans changed the title FFTW3 location can only be set via environment variable FFTW3 and ACE location can only be set via environment variable Oct 7, 2018
@KrisThielemans
Copy link
Member Author

KrisThielemans commented Oct 7, 2018

@evgueni-ovtchinnikov can you then add something like this to the doc as well? Feel free to improve:

CMake does come with FindArmadillo.cmake but it currently (at least up to CMake 3.12) has no variable to specify its location at all. This implies that when using USE_SYSTEM_Armadillo=On, you have to install armadillo in a system location, unless some extra work is done. See this post on stackoverflow for some suggestions, which we haven't tried.

KrisThielemans added a commit that referenced this issue Oct 7, 2018
Remove as it's ignored (see #147).
Note that it was wrongly spelled in External_Gadgetron.cmake
@evgueni-ovtchinnikov
Copy link
Contributor

done

paskino pushed a commit that referenced this issue Oct 23, 2018
* Remove setting of FFTW3_ROOT_DIR CMake variable

Remove as it's ignored (see #147).
Note that it was wrongly spelled in External_Gadgetron.cmake

* pass SWIG_EXECUTABLE to all projects

* correct use of mark_as_superbuild

Use `ALL_PROJECTS` as opposed to `PROJECTS ALL_PROJECTS`. This
seems to have the same effect though. See #70.

* small corrections to FindACE.cmake

- Don't set ACE_DIR with makr_as_superbuild. Should have been ACE_ROOT, but
it isn't used anyway
- correct variable names

* some clean-up of Armadillo

extra comments and remove mark_as_superbuild as not used.

* correct setting of SWIG variables, adding SWIG_EXECUTABLE to the cache

This also allows people to change the executable if they want.

* correct diagnostics when using system ACE
@KrisThielemans
Copy link
Member Author

It's possible that this can be resolved from CMake 3.12 by setting FFTW3_ROOT as find_library now goes and check there apparently. It would need setting CMP0074. However, this would then influence all other find statements. See #153.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants