Hello. I&#39;m using CMake as build system for a C/CXX project and i&#39;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 &quot;languages&quot; - 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.<br>

Still, i need the way, to &quot;inherit&quot; all compiler flags and probably linker from CXX language,  and i don&#39;t know how to do it.<br><br>Also, if you know how to to implement such thing in better way, please share your thoughts.<br>

<br>Thanks in advance.<br>