Salome HOME
Back to WIN32
authorYoann Audouin <yoann.audouin@edf.fr>
Tue, 28 Mar 2023 06:46:24 +0000 (08:46 +0200)
committerYoann Audouin <yoann.audouin@edf.fr>
Tue, 28 Mar 2023 06:46:24 +0000 (08:46 +0200)
src/SMESH/SMESH_DriverShape.cxx
src/SMESH/SMESH_Gen.cxx
src/SMESH/SMESH_Mesh.hxx
src/SMESH/SMESH_ParallelMesh.cxx
src/SMESH/SMESH_ParallelMesh.hxx

index 9c3088ee42f936bc1d1f48a677182c5614348a33..8efa1943f16e0ff6139123260047676559063bf3 100644 (file)
@@ -40,7 +40,7 @@
 //Occ include
 #include <TopoDS.hxx>
 
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
 namespace fs = boost::filesystem;
@@ -148,7 +148,7 @@ int exportBREPShape(const std::string shape_file, const TopoDS_Shape& aShape){
  * @return error code
  */
 int SMESH_DriverShape::importShape(const std::string shape_file, TopoDS_Shape& aShape){
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
   std::string type = fs::path(shape_file).extension().string();
   boost::algorithm::to_lower(type);
   if (type == ".brep"){
@@ -172,7 +172,7 @@ int SMESH_DriverShape::importShape(const std::string shape_file, TopoDS_Shape& a
  * @return error code
  */
 int SMESH_DriverShape::exportShape(const std::string shape_file, const TopoDS_Shape& aShape){
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
   std::string type = fs::path(shape_file).extension().string();
   boost::algorithm::to_lower(type);
   if (type == ".brep"){
index a1e6a816c993ae6236266c04b6a7f831c3d1075f..4a020890e93a29e92dd8c2cb91c4cf7642b045ad 100644 (file)
 
 #include <Basics_Utils.hxx>
 
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
 #include <boost/asio.hpp>
 #endif
 
 using namespace std;
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
 #include <boost/filesystem.hpp>
 namespace fs = boost::filesystem;
 #endif
@@ -307,7 +307,7 @@ bool SMESH_Gen::parallelComputeSubMeshes(
           const bool complexShapeFirst,
           const bool   aShapeOnly)
 {
-#ifdef DISABLE_PSMESH
+#ifdef WIN32
   throw SALOME_Exception("ParallelMesh is not working on Windows");
 #else
 
index d889e1d999809fde2be074ad3eb09fcb8a2ced83..7ff58767fa41f3adbe2e55cae1046de48bbf4889 100644 (file)
@@ -49,7 +49,7 @@
 #include <vector>
 #include <ostream>
 
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
 #include <boost/filesystem.hpp>
 #include <boost/asio/thread_pool.hpp>
 #endif
@@ -404,7 +404,7 @@ class SMESH_EXPORT SMESH_Mesh
 
   virtual bool IsParallel(){std::cout << "Should not pass here: IsParallel" << std::endl;return false;};
 
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
   virtual boost::filesystem::path GetTmpFolder() {return "";};
   virtual boost::asio::thread_pool* GetPool() {return NULL;};
 #endif
@@ -468,7 +468,7 @@ protected:
   TCallUp*                    _callUp;
 
   // Mutex for multhitreading write in SMESH_Mesh
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
   boost::mutex _my_lock;
 #endif
   int _NbThreads=-1;
index a56658892e6c33658098973389bf67cec72fa35d..cb508d54aebf83c1340062e64c3fe2a5950f2a38 100644 (file)
   #include <windows.h>
 #endif
 
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
 #include <boost/filesystem.hpp>
 namespace fs=boost::filesystem;
 #endif
 
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
 #include <boost/asio.hpp>
 #endif
 
@@ -58,7 +58,7 @@ SMESH_ParallelMesh::SMESH_ParallelMesh(int               theLocalId,
                                                                   theDocument)
 {
   MESSAGE("SMESH_ParallelMesh::SMESH_ParallelMesh(int localId)");
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
   _NbThreads = std::thread::hardware_concurrency();
 #else
   _NbThreads = 0;
@@ -82,7 +82,7 @@ SMESH_ParallelMesh::~SMESH_ParallelMesh()
 //=============================================================================
 void SMESH_ParallelMesh::CreateTmpFolder()
 {
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
   // Temporary folder that will be used by parallel computation
   tmp_folder = fs::temp_directory_path()/fs::unique_path(fs::path("SMESH_%%%%-%%%%"));
   fs::create_directories(tmp_folder);
@@ -96,7 +96,7 @@ void SMESH_ParallelMesh::CreateTmpFolder()
 //=============================================================================
 void SMESH_ParallelMesh::DeleteTmpFolder()
 {
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
     fs::remove_all(tmp_folder);
 #endif
 }
index 361d7fba1100a9f0dd17f8bbfcf9314d827fd15b..731030776a1785191e3ab75896c07df52f6771c7 100644 (file)
@@ -42,7 +42,7 @@ class SMESH_EXPORT SMESH_ParallelMesh: public SMESH_Mesh
 
   virtual ~SMESH_ParallelMesh();
 
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
   void Lock() override {_my_lock.lock();};
   void Unlock() override {_my_lock.unlock();};
 
@@ -94,7 +94,7 @@ class SMESH_EXPORT SMESH_ParallelMesh: public SMESH_Mesh
   SMESH_ParallelMesh():SMESH_Mesh() {};
   SMESH_ParallelMesh(const SMESH_ParallelMesh& aMesh):SMESH_Mesh(aMesh) {};
  private:
-#ifndef DISABLE_PSMESH
+#ifndef WIN32
   boost::filesystem::path tmp_folder;
   boost::asio::thread_pool *     _pool = nullptr; //thread pool for computation
 #endif