577 | | Using bjam add warnings=all |
| 577 | Using bjam add warnings=all to the invocation line. |
| 578 | |
| 579 | Putting options in jam files allows setting to be made for one or more specified compiler(s). |
| 580 | |
| 581 | Some sample options in jamfile.v2 are: |
| 582 | |
| 583 | {{{ |
| 584 | project |
| 585 | : requirements |
| 586 | <toolset>gcc:<cxxflags>-Wno-missing-braces |
| 587 | <toolset>darwin:<cxxflags>-Wno-missing-braces |
| 588 | <toolset>acc:<cxxflags>+W2068,2461,2236,4070,4069 # Comments on warning message help readers who do not have ACC documentation to hand. |
| 589 | <toolset>intel:<cxxflags>-nologo |
| 590 | <toolset>msvc:<warnings>all # == /W4 |
| 591 | <toolset>msvc:<asynch-exceptions>on # Needed for Boost.Test |
| 592 | <toolset>msvc:<cxxflags>/Za # disable MS extensions. |
| 593 | <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS |
| 594 | <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE |
| 595 | <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE |
| 596 | <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS |
| 597 | <toolset>msvc:<cxxflags>/wd4996 # 'putenv': The POSIX name for this item is deprecated. |
| 598 | <toolset>msvc:<cxxflags>/wd4512 # assignment operator could not be generated. |
| 599 | <toolset>msvc:<cxxflags>/wd4224 # nonstandard extension used : formal parameter 'arg' was previously defined as a type. |
| 600 | <toolset>msvc:<cxxflags>/wd4127 # expression is constant. |
| 601 | <toolset>msvc:<cxxflags>/wd4701 # unreachable code - needed for lexical cast - temporary for Boost 1.40 & earlier. |
| 602 | ... |
| 603 | ; |
| 604 | }}} |