Jamfile.v2 3.9 KB

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