← Back to team overview

kicad-developers team mailing list archive

[PATCH] remove_boost_thread_dependency.patch

 

Please excuse my stupidity #2.

Remove dependency on boost::thread.

>From b7e21ab681ba1ba27fb14c615838e7368f8eb58e Mon Sep 17 00:00:00 2001
From: decimad <michsteinb@xxxxxxxxx>
Date: Sat, 2 Jul 2016 04:37:40 +0200
Subject: [PATCH] remove boost::thread dependency

---
 CMakeLists.txt            | 2 +-
 common/footprint_info.cpp | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d915d8b..15b8d4c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -482,7 +482,7 @@ find_package( Cairo 1.8.8 REQUIRED )
 #
 # Note: Prior to Boost 1.59, the Boost context library is not built when compiling on windows
 #       with GCC.  You must patch the Boost sources.
-find_package( Boost 1.54.0 REQUIRED COMPONENTS context system thread )
+find_package( Boost 1.54.0 REQUIRED COMPONENTS context system )
 
 # Include MinGW resource compiler.
 include( MinGWResourceCompiler )
diff --git a/common/footprint_info.cpp b/common/footprint_info.cpp
index dab09cf..690f0bf 100644
--- a/common/footprint_info.cpp
+++ b/common/footprint_info.cpp
@@ -50,7 +50,7 @@
 #include <fp_lib_table.h>
 #include <fpid.h>
 #include <class_module.h>
-#include <boost/thread.hpp>
+#include <thread>
 #include <html_messagebox.h>
 
 
@@ -213,7 +213,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* a
         LOCALE_IO   top_most_nesting;
 
         // Something which will not invoke a thread copy constructor, one of many ways obviously:
-        typedef boost::ptr_vector< boost::thread >  MYTHREADS;
+        typedef std::vector< std::thread >  MYTHREADS;
 
         MYTHREADS threads;
 
@@ -234,7 +234,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* a
             else
             {
                 // Delegate the job to a temporary thread created here.
-                threads.push_back( new boost::thread( &FOOTPRINT_LIST::loader_job,
+                threads.push_back( std::thread( &FOOTPRINT_LIST::loader_job,
                         this, &nicknames[i], jobz ) );
             }
 
-- 
2.9.0.windows.1


Follow ups