Changes between Version 14 and Version 15 of Guidelines/MaintenanceGuidelines


Ignore:
Timestamp:
Nov 5, 2009, 3:49:00 PM (13 years ago)
Author:
Paul A. Bristow
Comment:

Added example & some typos corrected.

Legend:

Unmodified
Added
Removed
Modified
  • Guidelines/MaintenanceGuidelines

    v14 v15  
    575575For GCC this means -Wall -pendantic 
    576576
    577 Using bjam add warnings=all
     577Using bjam add warnings=all to the invocation line.
     578
     579Putting options in jam files allows setting to be made for one or more specified compiler(s).
     580
     581Some sample options in jamfile.v2 are:
     582
     583{{{
     584project 
     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}}}
    578605
    5796062  Consider each warning and
     
    587614to the package as possible so that users can still get warnings from *their code*.
    588615
    589 For MSVC, this involved pushing to save the current warning state, disabling the warning, and later popping to restore.
     616For MSVC, this involves pushing to save the current warning state, disabling the warning, and later popping to restore.
     617Adding some or all of the warning message is helpful to tell readers what warning is being ignored.
    590618
    591619{{{
    592620#if defined(_MSC_VER)
    593621#pragma warning(push) // Save warning settings.
    594 #pragma warning(disable : 4996) // disable depricated localtime/gmtime warning
     622#pragma warning(disable : 4996) // disable deprecated localtime/gmtime warning.
    595623#endif
    596624