diff options
Diffstat (limited to 'src/boost/libs/thread/test/winrt_init.cpp')
-rw-r--r-- | src/boost/libs/thread/test/winrt_init.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/boost/libs/thread/test/winrt_init.cpp b/src/boost/libs/thread/test/winrt_init.cpp new file mode 100644 index 000000000..b6d0864ba --- /dev/null +++ b/src/boost/libs/thread/test/winrt_init.cpp @@ -0,0 +1,19 @@ +// Copyright (C) 2014 Vicente Botet +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/predef/platform.h> + +#if BOOST_PLAT_WINDOWS_RUNTIME + +#include <wrl\wrappers\corewrappers.h> +#pragma comment(lib, "runtimeobject.lib") + +// Necessary for the tests which to keep the Windows Runtime active, +// when running in an actual Windows store/phone application initialization +// is handled automatically by the CRT. +// This is easier than calling in the main function for each test case. +Microsoft::WRL::Wrappers::RoInitializeWrapper runtime(RO_INIT_MULTITHREADED); + +#endif |