I think Dennis refers to setting cmake variables to define the use of multithreading, static, or debug libs (or single/double precision in your case). For example:
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) find_package( Boost ) I would also second the proposal of using such variables instead of components. cheers, Adolfo On Wed, May 20, 2009 at 4:21 PM, Marcel Loose <[email protected]> wrote: > Hi Denis, > > What do you mean with like FindBoost did? Can you be a bit more > specific? > > Boost components are AFAIK independent of one another, and they're > definitely not mutually exclusive, which is the case in my propsed setup > of FindFFTW? > > For example: > > find_package(FFTW COMPONENTS single double) > > shoud be flagged as an error, because single and double are mutaully > exclusive. > > Best regards, > Marcel Loose. > > > -----Original Message----- > From: Marcel Loose <[email protected]> > To: [email protected] > Subject: [CMake] Abuse of find_package COMPONENTS, or not? > Date: Wed, 20 May 2009 16:10:06 +0200 > > Hi all, > > I am busy writing a FindFFTW macro. Depending on whether you want to use > single or double precision you should include a different header file > and link to a different library. The same is true when using > parallelization like mpi or threads. > > Now I was considering to pass these options as COMPONENTS, since, AFAIK, > that's the only way to pass parameters to a FindXXX macro. > So, for example, the user of FindFFTW would do something like: > > find_package(FFTW COMPONENTS single threads) > > Do you guys consider this a good or a bad idea? If you think it's a bad > idea, do you have a suggestion how to do things differently? > > Best regards, > Marcel Loose. > > > > _______________________________________________ > 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 > > _______________________________________________ > 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 > -- Adolfo Rodríguez Tsouroukdissian Robotics engineer PAL ROBOTICS S.L http://www.pal-robotics.com Tel. +34.93.414.53.47 Fax.+34.93.209.11.09
_______________________________________________ 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
