From 498fe28b432f330bce57d1d137e66e0080227343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 9 Jun 2020 11:47:02 +0200 Subject: [PATCH] reduce dependency on boost::context The Boost Context module is required only for certain configurations, so adapt the build system checks to it. --- CMakeLists.txt | 2 +- appveyor.yml | 2 +- example/x3/CMakeLists.txt | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e132b4628..2f7d761aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,7 @@ OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples." ON) SET (Boost_USE_MULTITHREADED ON) SET (Boost_USE_STATIC_RUNTIME OFF) -FIND_PACKAGE (Boost REQUIRED COMPONENTS chrono context system timer) +FIND_PACKAGE (Boost REQUIRED COMPONENTS chrono system timer) INCLUDE_DIRECTORIES ( ${Boost_INCLUDE_DIRS} diff --git a/appveyor.yml b/appveyor.yml index 5dc7037ce..85a751959 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -48,7 +48,7 @@ build_script: cd .. cd .. if ($env:msvc -ne '"Visual Studio 14 2015"') { - ((Get-Content CMakeLists.txt) -replace "COMPONENTS chrono context system timer", "") | Set-Content -Path CMakeLists.txt + ((Get-Content CMakeLists.txt) -replace "COMPONENTS chrono system timer", "") | Set-Content -Path CMakeLists.txt } md build cd build diff --git a/example/x3/CMakeLists.txt b/example/x3/CMakeLists.txt index 30cb78878..f67ff80a8 100644 --- a/example/x3/CMakeLists.txt +++ b/example/x3/CMakeLists.txt @@ -1,4 +1,6 @@ IF (MSGPACK_USE_X3_PARSE AND MSGPACK_DEFAULT_API_VERSION VERSION_GREATER 1) + FIND_PACKAGE (Boost REQUIRED COMPONENTS context) + INCLUDE_DIRECTORIES ( ../include )