From 684338aff6cecad6e9ef32e321dd318081edb721 Mon Sep 17 00:00:00 2001
From: Alex Turbov <i.zaufi@gmail.com>
Date: Fri, 26 Apr 2019 14:46:17 +0800
Subject: FindBoost: Record compiler features for Boost 1.67 and above

Remove the 1.67 upper-bound on compiler feature computation so that with
newer versions we at least get it mostly right.  Leave a comment with
notes about updating features for future versions.
---
 Modules/FindBoost.cmake | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index b5cc4cf..cd79f24 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1048,11 +1048,17 @@ endfunction()
 # Some boost libraries may require particular set of compler features.
 # The very first one was `boost::fiber` introduced in Boost 1.62.
 # One can check required compiler features of it in
-# `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`.
+# - `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`;
+# - `${Boost_ROOT}/libs/context/build/Jamfile.v2`.
+#
+# TODO (Re)Check compiler features on (every?) release ???
+# One may use the following command to get the files to check:
+#
+#   $ find . -name Jamfile.v2 | grep build | xargs grep -l cxx1
 #
 function(_Boost_COMPILER_FEATURES component _ret)
-  # Boost >= 1.62 and < 1.67
-  if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700)
+  # Boost >= 1.62
+  if(NOT Boost_VERSION VERSION_LESS 106200)
     set(_Boost_FIBER_COMPILER_FEATURES
         cxx_alias_templates
         cxx_auto_type
-- 
cgit v0.12


From f06bf0fa5740a82a4205b95a5de3e2a0e4eb865a Mon Sep 17 00:00:00 2001
From: Alex Turbov <i.zaufi@gmail.com>
Date: Fri, 26 Apr 2019 14:46:17 +0800
Subject: FindBoost: Fix compiler features for `fiber` and `context`

---
 Modules/FindBoost.cmake | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index cd79f24..552c2fd 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1072,6 +1072,8 @@ function(_Boost_COMPILER_FEATURES component _ret)
         cxx_thread_local
         cxx_variadic_templates
     )
+    # Compiler feature for `context` same as for `fiber`.
+    set(_Boost_CONTEXT_COMPILER_FEATURES ${_Boost_FIBER_COMPILER_FEATURES})
   endif()
   string(TOUPPER ${component} uppercomponent)
   set(${_ret} ${_Boost_${uppercomponent}_COMPILER_FEATURES} PARENT_SCOPE)
-- 
cgit v0.12