On 03/14/2011 06:42 PM, arrowdodger wrote: > On Mon, Mar 14, 2011 at 7:16 PM, Michael Hertling <mhertl...@online.de>wrote: > >> 2) If you collect the affected files in a separate directory - which is >> probably recommendable anyway - you might set CMAKE_C_COMPILE_OBJECT, >> CMAKE_C_CREATE_SHARED_LIBRARY, CMAKE_C_LINK_EXECUTABLE etc. as well >> as their CXX counterparts in that directory to whatever suits your >> needs, and you can refer to the special placeholders <DEFINES>, >> <FLAGS> etc. from within the abovementioned rule variables. >> > > Oh, CMAKE_C_COMPILE_OBJECT is a rule for compiling *.c file, not *.o?
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 _______________________________________________ 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