> Is it possible to invoke a script function as part of a target? No, because the variable values are "all gone" after CMake finishes running. And the custom build targets do not run until later at build time.
> I have a build step where I need to process a bunch of variable > values before building a particular target. All of the custom > targets > require a COMMAND, not a function. I thought maybe I could push this > off to a script invoked by cmake -P, but a quick test revealed that > the > script does not inherit the variable environment and the variables > I'm > working with cannot be easily passed using -D values on the command > line. Running a script is probably the right approach. Perhaps you could write out a file at CMake configure time that contains sufficient information that your script could read at build time. It might not be easy, but it should be possible. HTH, David C. -- 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://www.cmake.org/mailman/listinfo/cmake
