1# Copyright Vladimir Prus 2004.
2# Distributed under the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt
4# or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6#| tag::doc[]
7
8[[bbv2.reference.tools.compiler.como]]
9= Comeau C/C++ Compiler
10
11The `como-linux` and the `como-win` modules supports the
12http://www.comeaucomputing.com/[Comeau C/C++ Compiler] on Linux and
13Windows respectively.
14
15The module is initialized using the following syntax:
16
17----
18using como : [version] : [c++-compile-command] : [compiler options] ;
19----
20
21This statement may be repeated several times, if you want to configure
22several versions of the compiler.
23
24If the command is not specified, B2 will search for a binary
25named `como` in PATH.
26
27The following options can be provided, using
28_`<option-name>option-value syntax`_:
29
30`cflags`::
31Specifies additional compiler flags that will be used when compiling C
32sources.
33
34`cxxflags`::
35Specifies additional compiler flags that will be used when compiling C++
36sources.
37
38`compileflags`::
39Specifies additional compiler flags that will be used when compiling both C
40and C++ sources.
41
42`linkflags`::
43Specifies additional command line options that will be passed to the linker.
44
45Before using the Windows version of the compiler, you need to setup
46necessary environment variables per compiler's documentation. In
47particular, the COMO_XXX_INCLUDE variable should be set, where XXX
48corresponds to the used backend C compiler.
49
50|# # end::doc[]
51
52# This is a generic 'como' toolset. Depending on the current system, it
53# forwards either to 'como-linux' or 'como-win' modules.
54
55import feature ;
56import os ;
57import toolset ;
58
59feature.extend toolset : como ;
60feature.subfeature toolset como : platform : : propagated link-incompatible ;
61
62rule init ( * : * )
63{
64    if [ os.name ] = LINUX
65    {
66        toolset.using como-linux :
67          $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
68    }
69    else
70    {
71        toolset.using como-win :
72          $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
73
74    }
75}
76