Skip to content

Commit

Permalink
Avoid some warnings from the generated jamgram.cpp.
Browse files Browse the repository at this point in the history
Some latest compilers are rather eager intheir warnings. This can cause
problems with the generated grammar code. Hence avoid such warnings when
compiling the grammar parser.
  • Loading branch information
grafikrobot committed May 28, 2021
1 parent 00e3b9e commit 2daa520
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Jamroot.jam
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,18 @@ else
alias python ;
}

obj jamgram.obj
: jamgram.cpp
: <toolset>gcc:<cxxflags>-Wno-free-nonheap-object
;
explicit jamgram.obj ;

local b2_src =
[ glob src/engine/*.cpp src/engine/modules/*.cpp :
src/engine/*nt.cpp src/engine/*unix.cpp src/engine/*vms.cpp
src/engine/yyacc.cpp src/engine/mkjambase.cpp
src/engine/check_cxx11.cpp
src/engine/jamgram.cpp
] ;
local b2_src_nt = [ glob src/engine/*nt.cpp ] ;
local b2_src_unix = [ glob src/engine/*unix.cpp ] ;
Expand All @@ -155,11 +162,11 @@ local unix_os = [ set.difference [ feature.values <target-os> ] : windows vms ]

exe b2
: $(b2_src)
jamgram.obj
python
: <target-os>windows:<source>$(b2_src_nt)
<target-os>vms:<source>$(b2_src_vms)
<target-os>$(unix_os):<source>$(b2_src_unix)
<dependency>jamgram.cpp
<toolset>msvc:<find-static-library>kernel32
<toolset>msvc:<find-static-library>advapi32
<toolset>msvc:<find-static-library>user32
Expand Down

0 comments on commit 2daa520

Please sign in to comment.