[CMake] Abuse of find_package COMPONENTS, or not?

Marcel Loose loose at astron.nl
Wed May 20 10:21:38 EDT 2009


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 <loose at astron.nl>
To: cmake at cmake.org
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



More information about the CMake mailing list