Skip to content

Commit b0c8179

Browse files
author
Teseo Schneider
committed
changed 3dparty folder on mac
1 parent 260ee3c commit b0c8179

File tree

8 files changed

+28
-9
lines changed

8 files changed

+28
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ build/
22
build.nosync/
33
bin/
44
bin_rel/
5-
3rdparty/
5+
3rdparty*
66
*.sublime-workspace
77
copy_lib
88
*.sublime-project

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ cmake_minimum_required(VERSION 3.1)
33
project(polyfempy)
44
################################################################################
55

6-
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/)
6+
if(INPUT_THIRD_PARTY_DIR)
7+
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_THIRD_PARTY_DIR}/)
8+
else()
9+
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/)
10+
endif()
711
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
812

913
# Color output

cmake/PolyfemPythonDependencies.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
### Configuration
88
set(POLYFEM_PYTHON_ROOT "${CMAKE_CURRENT_LIST_DIR}/..")
9-
set(POLYFEM_PYTHON_EXTERNAL "${POLYFEM_PYTHON_ROOT}/3rdparty")
9+
set(POLYFEM_PYTHON_EXTERNAL ${THIRD_PARTY_DIR})
1010

1111
# Download and update 3rdparty libraries
1212
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ def build_extension(self, ext):
5353
'-DPOLYFEM_WITH_APPS=OFF',
5454
'-DPOLYFEM_WITH_MISC=OFF']
5555

56+
if platform.system() == 'Darwin':
57+
cmake_args.append('-DINPUT_THIRD_PARTY_DIR=3rdparty.nosync')
58+
59+
5660
cfg = 'Debug' if self.debug else 'Release'
5761
build_args = ['--config', cfg]
5862

tests/bending.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import unittest
22

3+
import platform
34
import polyfempy as pf
45
# from .utils import plot
56
import os
67

78

89
class BendingTest(unittest.TestCase):
910
def test_run(self):
11+
root_folder = os.path.join("..", "3rdparty.nosync" if platform.system() == 'Darwin' else "3rdparty", "data")
12+
13+
1014
dir_path = os.path.dirname(os.path.realpath(__file__))
11-
mesh_path = os.path.join(dir_path, "../3rdparty/data/square_beam.mesh")
12-
tag_path = os.path.join(dir_path, "../3rdparty/data/square_beam.txt")
15+
mesh_path = os.path.join(dir_path, root_folder, "square_beam.mesh")
16+
tag_path = os.path.join(dir_path, root_folder, "square_beam.txt")
1317

1418
settings = pf.Settings()
1519
settings.discr_order = 1

tests/inflation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import polyfempy as pf
44
import numpy as np
5+
import platform
56

67
# from .utils import plot
78

@@ -10,11 +11,13 @@
1011

1112
class InflationTest(unittest.TestCase):
1213
def test_run(self):
14+
root_folder = os.path.join("..", "3rdparty.nosync" if platform.system() == 'Darwin' else "3rdparty", "data")
15+
1316
solver = pf.Solver()
1417

1518
#some setup
1619
dir_path = os.path.dirname(os.path.realpath(__file__))
17-
mesh_path = os.path.join(dir_path, "../3rdparty/data/circle2.msh")
20+
mesh_path = os.path.join(dir_path, root_folder, "circle2.msh")
1821
print(mesh_path)
1922

2023
settings = pf.Settings()

tests/plane_hole.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
import polyfempy as pf
44
# from .utils import plot
55
import os
6+
import platform
67

78

89
class BendingTest(unittest.TestCase):
910
def test_run(self):
11+
root_folder = os.path.join("..", "3rdparty.nosync" if platform.system() == 'Darwin' else "3rdparty", "data")
12+
1013
dir_path = os.path.dirname(os.path.realpath(__file__))
11-
mesh_path = os.path.join(dir_path, "../3rdparty/data/plane_hole.obj")
14+
mesh_path = os.path.join(dir_path, root_folder, "plane_hole.obj")
1215

1316
settings = pf.Settings()
1417
settings.discr_order = 1

tests/torsion.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
# from .utils import plot
55

66
import os
7-
7+
import platform
88

99
class TorsionTest(unittest.TestCase):
1010
def test_run(self):
11+
root_folder = os.path.join("..", "3rdparty.nosync" if platform.system() == 'Darwin' else "3rdparty", "data")
1112
dir_path = os.path.dirname(os.path.realpath(__file__))
12-
mesh_path = os.path.join(dir_path, "../3rdparty/data/square_beam_h.HYBRID")
13+
mesh_path = os.path.join(dir_path, root_folder, "square_beam_h.HYBRID")
1314

1415
settings = pf.Settings()
1516
settings.discr_order = 1

0 commit comments

Comments
 (0)