On 03/15/2011 09:53 AM, arrowdodger wrote: > On Tue, Mar 15, 2011 at 1:44 AM, Michael Hertling <mhertl...@online.de>wrote: > >> To be exact, it's a rule variable which describes how to compile a C >> source file to an object file. On my system, it currently expands to: >> >> <CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE> >> >> AFAIK, these rule variables can be redefined and have the usual >> directory scope; the bracketed placeholders have a special meaning >> when the rule is used to generate command lines in a Makefile, e.g. >> So, you might set CMAKE_C_COMPILE_OBJECT in a directory to whatever >> is necessary to compile a C source file to byte code while you can >> refer to flags, preprocessor definitions and the source and object >> file via the placeholders. With just a few files to be byte-code- >> compiled, that's possibly more appropriate than defining a new >> language for this purpose. >> >> Regards, >> >> Michael > > > Thanks, it worked. >
Just one warning: AFAIK these rule variables are only used for Makefile-based generators, *NOT* for Xcode and VisualStudio and the like. I'd prefer the route via add_custom_command/add_custom_target... Michael _______________________________________________ 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