mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-30 07:57:55 +08:00
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
From 4a7935e1f8d1756cbeafb2564066551f9bd766f0 Mon Sep 17 00:00:00 2001
|
|
From: jjll <jjll@gmv.com>
|
|
Date: Wed, 6 Sep 2023 14:25:30 +0200
|
|
Subject: [PATCH] compatibility boost >= 1.83
|
|
|
|
---
|
|
src/lib/parallel_progress.h | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/lib/parallel_progress.h b/src/lib/parallel_progress.h
|
|
index 958b170..ee938d9 100755
|
|
--- a/src/lib/parallel_progress.h
|
|
+++ b/src/lib/parallel_progress.h
|
|
@@ -23,7 +23,14 @@
|
|
#ifndef VINA_PARALLEL_PROGRESS_H
|
|
#define VINA_PARALLEL_PROGRESS_H
|
|
|
|
+#include <boost/version.hpp>
|
|
+#if BOOST_VERSION < 107200
|
|
#include <boost/progress.hpp>
|
|
+typedef boost::progress_display boost_progress;
|
|
+#else
|
|
+#include <boost/timer/progress_display.hpp>
|
|
+typedef boost::timer::progress_display boost_progress;
|
|
+#endif
|
|
#include <boost/thread/mutex.hpp>
|
|
|
|
#include <functional>
|
|
@@ -34,7 +41,7 @@ struct parallel_progress : public incrementable {
|
|
parallel_progress(std::function<void(double)>* c = NULL) : p(NULL), callback(c) {}
|
|
void init(unsigned long n) {
|
|
count = n;
|
|
- p = new boost::progress_display(count);
|
|
+ p = new boost_progress(count);
|
|
}
|
|
void operator++() {
|
|
if(p) {
|
|
@@ -47,7 +54,7 @@ struct parallel_progress : public incrementable {
|
|
virtual ~parallel_progress() { delete p; }
|
|
private:
|
|
boost::mutex self;
|
|
- boost::progress_display* p;
|
|
+ boost_progress* p;
|
|
std::function<void(double)>* callback;
|
|
unsigned long count;
|
|
};
|