[cmake-developers] Best practice for providing inputs to find modules

Anh Huynh tinlun123 at gmail.com
Thu Aug 17 12:20:19 EDT 2017


Hi everyone,

I am developing a module to find OpenACC. If I want the user to provide
inputs to select GPU targets, and use that input in the find module to
provide the correct flag for the user, what is the best practice to do
that? For example, PGI compilers use -ta=tesla or -ta=multicore to select
targets. It would be great if the user can specify the target without
having to add the flag manually.

Should I have the user set a definition before using find_package and
checking for that definition?
Should I simply have the user add the relevant flags themselves?
Should I provide some variable that would contain the correct flag so the
user can use it to append to his flags?

Thank you in advance!

Tin Huynh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170817/e20c686e/attachment.html>


More information about the cmake-developers mailing list