On 08/17/2017 12:20 PM, Anh Huynh wrote: > If I want the user to provide inputs to select GPU targets [snip]> Should I have the user set a definition before using find_package> and checking for that definition?
Yes. Document it as an input variable that can be set prior to the call. Either the calling package or even the end user running CMake could set it. > Should I simply have the user add the relevant flags themselves? Ideally not. The caller of find_package(OpenACC) is always free to ignore your results and add its own flags. It shouldn't have to know all the flags for various toolchains. > Should I provide some variable that would contain the correct flag> so the > user can use it to append to his flags? Yes. The caller of find_package(OpenACC) should use the variable to add the flags to relevant parts of the project. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers