Commit 5777c54e authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Add an option to the MSVC build to suppress boost's out of date config messages

Summary:
MSVC moves faster than boost updates, so it's not unusual to be building with an MSVC newer than the boost being used was able to be tested against. This causes Boost to emit a message at compile time for every compilation unit it is included in.
Luckly, boost provides a way out of the message, so add a config option to do so and enable it by default.

Reviewed By: yfeldblum

Differential Revision: D7388583

fbshipit-source-id: 8ecddc048df432df5200f4601e4121bdbd275220
parent d6dd4b47
......@@ -8,6 +8,7 @@ option(MSVC_ENABLE_LTCG "If enabled, use Link Time Code Generation for Release b
option(MSVC_ENABLE_PARALLEL_BUILD "If enabled, build multiple source files in parallel." ON)
option(MSVC_ENABLE_STATIC_ANALYSIS "If enabled, do more complex static analysis and generate warnings appropriately." OFF)
option(MSVC_USE_STATIC_RUNTIME "If enabled, build against the static, rather than the dynamic, runtime." OFF)
option(MSVC_SUPPRESS_BOOST_CONFIG_OUTDATED "If enabled, suppress Boost's warnings about the config being out of date." ON)
# Alas, option() doesn't support string values.
set(MSVC_FAVORED_ARCHITECTURE "blend" CACHE STRING "One of 'blend', 'AMD64', 'INTEL64', or 'ATOM'. This tells the compiler to generate code optimized to run best on the specified architecture.")
......@@ -257,6 +258,7 @@ function(apply_folly_compile_options_to_target THETARGET)
$<$<BOOL:${MSVC_ENABLE_CPP_LATEST}>:_HAS_AUTO_PTR_ETC=1> # We're building in C++ 17 or greater mode, but certain dependencies (Boost) still have dependencies on unary_function and binary_function, so we have to make sure not to remove them.
$<$<BOOL:${MSVC_ENABLE_LEAN_AND_MEAN_WINDOWS}>:WIN32_LEAN_AND_MEAN> # Don't include most of Windows.h
$<$<BOOL:${MSVC_SUPPRESS_BOOST_CONFIG_OUTDATED}>:BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE> # MSVC moves faster than boost, so add a quick way to disable the messages.
)
# Ignore a warning about an object file not defining any symbols,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment