Hi, On 28 March 2016 at 15:05, Brad King <brad.k...@kitware.com> wrote: > On 03/27/2016 06:11 AM, Dan Liew wrote: >> OUTPUT does not accept generator expressions, why? > > It hasn't been implemented. At least at one time it would have been > very hard to implement. I'm not sure now because there has been a lot > of refactoring since I last looked at it. > > There is some discussion here: > > https://cmake.org/Bug/view.php?id=13840 > https://cmake.org/Bug/view.php?id=12877#c28315 > >> If I can't use generator expressions with ``OUTPUT``, how am I >> supposed to output a file into the build directory of a target? > > Unfortunately it is not possible to do cleanly without fixing the > above. Approximations include: > > * Use a POST_BUILD command on the target instead. > > * Make the OUTPUT a timestamp file and generate the real output > as a side effect. > > If anyone is interested in trying to implement generator expressions > for custom command outputs, I can provide more details to get started.
Thanks for the info Brad. I wish I had time to look into this but I don't so for now I'll just work around it. Dan. -- 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