Boost logo

Boost-Build :

From: Steven Knight (knight_at_[hidden])
Date: 2003-03-06 09:58:04


> Vladimir Prus <ghost_at_[hidden]> writes:
>
> > Oops! The '.c' extension should be recognized for C files!
>
> It wouldn't surprise me if some people like this:
>
> .c -> C
> .C -> C++

FWIW:

Yes, this is the norm for a lot of projects on case-sensitive systems
(Linux/UNIX/POSIX), so SCons chooses between the C and C++ compilers for
a given .c or .C source file like you indicate above.

Of course, there's no real distinction between .c and .C on
case-insensitive systems like Win32, so on those, SCons assumes both
want to use the C compiler. C++ users have to use .cpp or .cc or .cxx
or their upper-case counterparts.

The different behaviors make for a little more explanation in the
documentation, but seem to match most closely people's default
expectations for their operating system(s).

IIRC, we chose these rules for SCons because they match the behavior of
GNU Make (among other de facto standards).

--SK

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk