FreeCAD/ondselsolver_fix_gcc_75_filesystem.patch
Dmitry Roshchin eb9f28bb8f - Update to version 1.0.0
- Update to version 1.0.0
  For details, see https://wiki.freecad.org/Release_notes_1.0
  The most notable improvements over the 0.21 release series are:
  * inclusion of the topological naming problem mitigation code
  * an integrated assembly workbench
  * a new materials system
  * and many UI/UX improvements
- Drop obsolete/upstream patches:
  * freecad-copy_options.patch
  * freecad-copy_options-2.patch
  * freecad-boost185.patch
  * boost_1_86_fixes.patch
  * fix_vtk_9_3_compat.patch
  * freecad-xerces_3_3_compat.patch
- Add
  * 0001-Mod-CAM-Add-missing-OpenGL-includes.patch
  * ondselsolver_fix_gcc_75_filesystem.patch

OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=181
2024-11-20 09:03:12 +00:00

52 lines
1.7 KiB
Diff

From 2e3659c4bce3e6885269e0cb3d640261b2a91108 Mon Sep 17 00:00:00 2001
From: huguesdpdn <huguesdpdn.aerospace@gmail.com>
Date: Mon, 4 Nov 2024 16:00:12 +0100
Subject: [PATCH] Fix compilation under gcc7.5 (#81)
* Correct typo in individual license file name
* Fix compilation under GCC 7.5 for Ubuntu
---
OndselSolver/ASMTAssembly.cpp | 5 +++++
OndselSolverMain/OndselSolver.cpp | 1 -
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/OndselSolver/ASMTAssembly.cpp b/OndselSolver/ASMTAssembly.cpp
index 9daf755..0f3dd1d 100644
--- a/OndselSolver/ASMTAssembly.cpp
+++ b/OndselSolver/ASMTAssembly.cpp
@@ -62,7 +62,9 @@
#include "ASMTRotationLimit.h"
#include "ASMTTranslationLimit.h"
#include "ExternalSystem.h"
+#if __GNUC__ >= 8
#include <filesystem>
+#endif
using namespace MbD;
@@ -359,8 +361,11 @@ void MbD::ASMTAssembly::runSinglePendulum()
std::shared_ptr<ASMTAssembly> MbD::ASMTAssembly::assemblyFromFile(const std::string& fileName)
{
+ // https://stackoverflow.com/a/45867491
+ #if __GNUC__ >= 8
std::filesystem::path currentPath = std::filesystem::current_path();
std::cout << "Current directory: " << currentPath << std::endl;
+ #endif
std::ifstream stream(fileName);
if (stream.fail()) {
diff --git a/OndselSolverMain/OndselSolver.cpp b/OndselSolverMain/OndselSolver.cpp
index d4b82d9..97ab5b9 100644
--- a/OndselSolverMain/OndselSolver.cpp
+++ b/OndselSolverMain/OndselSolver.cpp
@@ -12,7 +12,6 @@
* @brief Program to assemble a piston crank system.
*********************************************************************/
-#include <filesystem>
#include "../OndselSolver/CADSystem.h"
#include "../OndselSolver/CREATE.h"
#include "../OndselSolver/GESpMatParPvPrecise.h"