On Saturday 19 May 2012, Johannes Zarl wrote: > Hello Paul, > > I don't know about your specific find_package file for FFTW, but we do use > modules together with CMake, so I'll add my thoughts: > > As Eric already said, the modules command alters your environment. CMake > doesn't know about shell modules, but most find_package commands provide > some way to tell them about the location of a package by specifying an > environment variable (normally something like <PACKAGE>_ROOT or > <PACKAGE>_DIR). You'll have to look in the find-package script if this is > the case with your FindFFTW.cmake script. If it's not written in the > documentation on top of that file, search for "$ENV". > > If your FindFFTW3.cmake does not examine any environment variable, you > should fix it in your project (and file a bug with the original project, > if it's not your project). If that's not an option, it's probably best if > you just set whatever variable your findFFTW3.cmake script expects as a > clue as parameter to cmake (e.g. "cmake .. > -DFFTW3_INCLUDE_DIR=$FFTW3_ROOT/include"). > > So in summary, you should fix your module file to provide a suitable > variable pointing to your installation root, and you should also fix > poorly written FindXXX.cmake scripts circulating in the wild.
Yes, either such a env. variable as pointed out here, or a modified CMAKE_PREFIX_PATH as mentioned in the other email. Alex
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
