Boost logo

Boost-Build :

From: Stanislav Baranov (sbaranov_at_[hidden])
Date: 2005-01-26 15:39:34


--- In jamboost_at_[hidden], "sbaranov2" <sbaranov_at_c...> wrote:
>
> The standard msvc.jam switches compiler to C mode for all *.c files
> (this adds -TC compiler option for *.c files and -TP for *.cpp
files):
>
> generators.register-c-compiler msvc.compile.c++ : CPP : OBJ :
> <toolset>msvc ;
> generators.register-c-compiler msvc.compile.c : C : OBJ :
> <toolset>msvc ;
>
> What's the easiest way to make *.c files use -TP compiler option
> without editing msvc.jam? (Supposedly from my project-root.jam?)

Here's a quite dirty solution that I found. I had to replace all
occurences of <cxxflags> in my Jamfiles to <cflags>, and add another
<cflags>/TP. It results in MSVC warning that -TC is being overridden
with /TP, but it works. Do you see a cleaner solution, to somehow
just tell Bjam to use c++ action for *.c and be done with it?

Stanislav

 


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