• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2#          Copyright Andrey Semashev 2007 - 2016.
3# Distributed under the Boost Software License, Version 1.0.
4#    (See accompanying file LICENSE_1_0.txt or copy at
5#          http://www.boost.org/LICENSE_1_0.txt)
6#
7
8import os ;
9import configure ;
10import ../../build/log-platform-config ;
11
12rule has-config-flag ( flag : properties * )
13{
14    if ( "<define>$(flag)" in $(properties) || "<define>$(flag)=1" in $(properties) )
15    {
16        return 1 ;
17    }
18    else
19    {
20        return ;
21    }
22}
23
24rule check-message-compiler ( properties * )
25{
26    local result ;
27
28    if <target-os>windows in $(properties)
29    {
30        if ! [ has-config-flag BOOST_LOG_WITHOUT_EVENT_LOG : $(properties) ]
31        {
32            local has_mc = [ configure.builds /boost/log/message-compiler//test-availability : $(properties) : message-compiler ] ;
33            if ! $(has_mc)
34            {
35                result += <build>no ;
36            }
37        }
38    }
39    else
40    {
41        result += <build>no ;
42    }
43
44    return $(result) ;
45}
46
47project
48    : requirements
49        <conditional>@log-platform-config.set-platform-defines
50        <conditional>@check-message-compiler
51
52        <link>shared
53        <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
54        <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
55        <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
56        <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
57        <toolset>msvc:<cxxflags>/bigobj
58        <toolset>msvc:<cxxflags>/wd4503 # decorated name length exceeded, name was truncated
59        <toolset>msvc:<cxxflags>/wd4456 # declaration of 'A' hides previous local declaration
60        <toolset>msvc:<cxxflags>/wd4459 # declaration of 'A' hides global declaration
61        <toolset>msvc:<cxxflags>/wd4003 # not enough actual parameters for macro 'X' - caused by BOOST_PP_IS_EMPTY and BOOST_PP_IS_BEGIN_PARENS which are used by Fusion
62        <toolset>intel-win:<define>_SCL_SECURE_NO_WARNINGS
63        <toolset>intel-win:<define>_SCL_SECURE_NO_DEPRECATE
64        <toolset>intel-win:<define>_CRT_SECURE_NO_WARNINGS
65        <toolset>intel-win:<define>_CRT_SECURE_NO_DEPRECATE
66        <toolset>darwin:<cxxflags>-ftemplate-depth-1024
67        <toolset>gcc:<cxxflags>-ftemplate-depth-1024
68        <toolset>gcc:<cxxflags>-fno-strict-aliasing  # avoids strict aliasing violations in other Boost components
69
70        # Disable Intel warnings:
71        # warning #177: function "X" was declared but never referenced
72        # warning #780: using-declaration ignored -- it refers to the current namespace
73        # warning #2196: routine is both "inline" and "noinline"
74        # remark #1782: #pragma once is obsolete. Use #ifndef guard instead.
75        # remark #193: zero used for undefined preprocessing identifier "X"
76        # remark #304: access control not specified ("public" by default)
77        # remark #981: operands are evaluated in unspecified order
78        # remark #1418: external function definition with no prior declaration
79        # Mostly comes from Boost.Phoenix: warning #411: class "X" defines no constructor to initialize the following: reference member "Y"...
80        # warning #734: "X" (declared at line N of "file.hpp"), required for copy that was eliminated, is inaccessible
81        # warning #279: controlling expression is constant
82        <toolset>intel-win:<cxxflags>"/Qwd177,780,2196,1782,193,304,981,1418,411,734,279"
83        <toolset>intel-linux:<cxxflags>"-wd177,780,2196,1782,193,304,981,1418,411,734,279"
84        <toolset>intel-darwin:<cxxflags>"-wd177,780,2196,1782,193,304,981,1418,411,734,279"
85
86        <library>/boost/log//boost_log
87        <library>/boost/date_time//boost_date_time
88        <library>/boost/filesystem//boost_filesystem
89        <library>/boost/thread//boost_thread
90        <threading>multi
91    ;
92
93lib event_log_messages
94    : event_log_messages.mc
95    : <linkflags>-noentry
96#      <name>event_log_messages
97    ;
98
99exe event_log
100    : main.cpp
101    : <implicit-dependency>event_log_messages
102    ;
103