Shortly, yes to both.
You can mangle with pretty much everything. There are flags and variables that bind extensions to language; and then language to compiler options/executables that define toolsets and build targets.
Check following links to documentation. Those are some pleasant short readings.
- Change compiler/toolset
- Per-language extensions
- LANGUAGE variable
Note: The wiki might be outdated but it should hold in case of important and educational matter.
PS. There is whole bunch of related options. For some longer read you can check following sections of documentation: Properties on Source Files and Variables for Languages. 2. and 3. come from these sections.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…