[CMake] Adding new language.

arrowdodger 6yearold at gmail.com
Mon Mar 14 10:15:06 EDT 2011


Hello. I'm using CMake as build system for a C/CXX project and i've faced
the following problem: I need to compile some sources as bytecode for VM.
This is achieved by using different linker (with different flags) and,
probably, different compiler. At the moment, the only solution i see is to
create two new CMake "languages" - BC_C and BC_CXX by setting
CMAKE_BC_C_{COMPILER,LINK_EXECUTABLE}. Then, i want to set LANGUAGE and
COMPILE_FLAGS properties on files, which i want to be compiled as bytecode
and finally define LINKER_LANGUAGE property on target.
Still, i need the way, to "inherit" all compiler flags and probably linker
from CXX language, and i don't know how to do it.

Also, if you know how to to implement such thing in better way, please share
your thoughts.

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110314/72672eb6/attachment.htm>


More information about the CMake mailing list