@@ -14,97 +14,96 @@ class Feelpp(CMakePackage):
14
14
the development of applications.
15
15
"""
16
16
17
-
18
17
homepage = "https://docs.feelpp.org"
19
- url = "https://github.com/feelpp/feelpp/archive/v0.110.2.tar.gz"
20
- git = "https://github.com/feelpp/feelpp.git"
18
+ url = "https://github.com/feelpp/feelpp/archive/v0.110.2.tar.gz"
19
+ git = "https://github.com/feelpp/feelpp.git"
21
20
22
21
license ("LGPL-3.0-or-later AND GPL-3.0-or-later" )
23
22
maintainers ( "prudhomm" , "vincentchabannes" )
24
23
25
- version (' develop' , branch = ' develop' )
26
- version (' preset' , branch = ' 2284-add-spack-environment-to-the-main-ci' )
24
+ version (" develop" , branch = " develop" )
25
+ version (" preset" , branch = " 2284-add-spack-environment-to-the-main-ci" )
27
26
28
27
# Define variants
29
- variant (' toolboxes' , default = False , description = "Enable the Feel++ toolboxes" )
30
- variant (' mor' , default = False , description = "Enable Model Order Reduction (MOR)" )
31
- variant (' python' , default = False , description = "Enable Python wrappers" )
32
- variant (' quickstart' , default = False , description = "Enable the quickstart examples" )
33
- variant (' tests' , default = False , description = "Enable the tests" )
28
+ variant (" toolboxes" , default = False , description = "Enable the Feel++ toolboxes" )
29
+ variant (" mor" , default = False , description = "Enable Model Order Reduction (MOR)" )
30
+ variant (" python" , default = False , description = "Enable Python wrappers" )
31
+ variant (" quickstart" , default = False , description = "Enable the quickstart examples" )
32
+ variant (" tests" , default = False , description = "Enable the tests" )
34
33
35
34
# Add variants for C++ standards
36
- variant (' cpp17' , default = False , description = "Use C++17 standard" )
37
- variant (' cpp20' , default = True , description = "Use C++20 standard" )
38
- variant (' cpp23' , default = False , description = "Use C++23 standard" )
35
+ variant (" cpp17" , default = False , description = "Use C++17 standard" )
36
+ variant (" cpp20" , default = True , description = "Use C++20 standard" )
37
+ variant (" cpp23" , default = False , description = "Use C++23 standard" )
39
38
40
39
# Define conflicts between the C++ standard variants
41
- conflicts (' +cpp17' , when = ' +cpp20' , msg = "Cannot enable both C++17 and C++20" )
42
- conflicts (' +cpp17' , when = ' +cpp23' , msg = "Cannot enable both C++17 and C++23" )
43
- conflicts (' +cpp20' , when = ' +cpp23' , msg = "Cannot enable both C++20 and C++23" )
40
+ conflicts (" +cpp17" , when = " +cpp20" , msg = "Cannot enable both C++17 and C++20" )
41
+ conflicts (" +cpp17" , when = " +cpp23" , msg = "Cannot enable both C++17 and C++23" )
42
+ conflicts (" +cpp20" , when = " +cpp23" , msg = "Cannot enable both C++20 and C++23" )
44
43
45
44
46
45
# Specify dependencies with the required versions
47
- depends_on (
' [email protected] :' ,
type = ' build' )
# Require CMake > 3.21
48
- depends_on (
' [email protected] : +regex+date_time+filesystem+iostreams+mpi+multithreaded+program_options+serialization+shared+system+test' )
49
- depends_on (
' [email protected] +mumps+hwloc+ptscotch +suite-sparse+hdf5 +hypre+kokkos' )
50
- depends_on (' llvm@18:' ,type = ' build' ) # Require LLVM (Clang) version 18 or higher
51
- depends_on (' slepc' )
52
- depends_on (' mpi' )
53
-
54
- depends_on (' fftw' )
55
- depends_on (' libunwind' )
56
- depends_on (' libzip' )
57
- depends_on (' bison' )
58
- depends_on (' flex' )
59
- depends_on (' pugixml' )
60
- depends_on (' gsl' )
61
- depends_on (' glpk' )
62
- depends_on (' gl2ps' )
63
- depends_on (' ruby' )
64
- depends_on (' gmsh +opencascade+mmg+fltk' )
65
- depends_on (' ruby' )
66
- depends_on (' curl' )
46
+ depends_on (
" [email protected] :" ,
type = " build" )
# Require CMake > 3.21
47
+ depends_on (
" [email protected] : +regex+date_time+filesystem+iostreams+mpi+multithreaded+program_options+serialization+shared+system+test" )
48
+ depends_on (
" [email protected] +mumps+hwloc+ptscotch +suite-sparse+hdf5 +hypre+kokkos" )
49
+ depends_on (" llvm@18:" ,type = " build" ) # Require LLVM (Clang) version 18 or higher
50
+ depends_on (" slepc" )
51
+ depends_on (" mpi" )
52
+
53
+ depends_on (" fftw" )
54
+ depends_on (" libunwind" )
55
+ depends_on (" libzip" )
56
+ depends_on (" bison" )
57
+ depends_on (" flex" )
58
+ depends_on (" pugixml" )
59
+ depends_on (" gsl" )
60
+ depends_on (" glpk" )
61
+ depends_on (" gl2ps" )
62
+ depends_on (" ruby" )
63
+ depends_on (" gmsh +opencascade+mmg+fltk" )
64
+ depends_on (" ruby" )
65
+ depends_on (" curl" )
67
66
68
67
69
68
70
69
71
70
# Python dependencies if +python variant is enabled
72
- depends_on (' py-pytest' , when = ' +python' )
73
- depends_on (' py-pandas' , when = ' +python' )
74
- depends_on (' py-petsc4py' , when = ' +python' )
75
- depends_on (' py-slepc4py' , when = ' +python' )
76
- depends_on (' py-numpy' , when = ' +python' )
77
- depends_on (' py-pybind11' , when = ' +python' )
78
- depends_on (' py-sympy' , when = ' +python' )
79
- depends_on (' py-plotly' , when = ' +python' )
80
- depends_on (' py-scipy' , when = ' +python' )
81
- depends_on (' py-tabulate' , when = ' +python' )
82
- depends_on (' py-ipykernel' , when = ' +python' )
83
- depends_on (' py-mpi4py' , when = ' +python' )
84
- depends_on (
' [email protected] :' ,
when = ' +python' ,
type = (
' build' , ' run' ))
71
+ depends_on (" py-pytest" , when = " +python" )
72
+ depends_on (" py-pandas" , when = " +python" )
73
+ depends_on (" py-petsc4py" , when = " +python" )
74
+ depends_on (" py-slepc4py" , when = " +python" )
75
+ depends_on (" py-numpy" , when = " +python" )
76
+ depends_on (" py-pybind11" , when = " +python" )
77
+ depends_on (" py-sympy" , when = " +python" )
78
+ depends_on (" py-plotly" , when = " +python" )
79
+ depends_on (" py-scipy" , when = " +python" )
80
+ depends_on (" py-tabulate" , when = " +python" )
81
+ depends_on (" py-ipykernel" , when = " +python" )
82
+ depends_on (" py-mpi4py" , when = " +python" )
83
+ depends_on (
" [email protected] :" ,
when = " +python" ,
type = (
" build" , " run" ))
85
84
86
85
def get_cpp_version (self ):
87
86
"""Helper function to determine the C++ standard preset."""
88
- if ' +cpp17' in self .spec :
89
- return ' cpp17'
90
- elif ' +cpp20' in self .spec :
91
- return ' cpp20'
92
- elif ' +cpp23' in self .spec :
93
- return ' cpp17'
87
+ if " +cpp17" in self .spec :
88
+ return " cpp17"
89
+ elif " +cpp20" in self .spec :
90
+ return " cpp20"
91
+ elif " +cpp23" in self .spec :
92
+ return " cpp17"
94
93
else :
95
- return ' cpp20' # default
94
+ return " cpp20" # default
96
95
97
96
def get_preset_name (self ):
98
97
cpp_version = self .get_cpp_version ()
99
- preset_name = f' feelpp-clang-{ cpp_version } -default-release'
98
+ preset_name = f" feelpp-clang-{ cpp_version } -default-release"
100
99
return preset_name
101
100
102
101
def cmake_args (self ):
103
102
"""Define the CMake preset and CMake options based on variants"""
104
103
105
104
# Add options based on the variants
106
105
args = [
107
- f' --preset={ self .get_preset_name ()} ' ,
106
+ f" --preset={ self .get_preset_name ()} " ,
108
107
self .define_from_variant ("FEELPP_ENABLE_QUICKSTART" , "quickstart" ),
109
108
self .define_from_variant ("FEELPP_ENABLE_TESTS" , "tests" ),
110
109
self .define_from_variant ("FEELPP_ENABLE_TOOLBOXES" , "toolboxes" ),
@@ -115,17 +114,17 @@ def cmake_args(self):
115
114
116
115
def build (self , spec , prefix ):
117
116
"""Override the default build command to use CMake presets."""
118
- cmake = which (' cmake' )
117
+ cmake = which (" cmake" )
119
118
120
- cmake (' --build' , ' --preset' , self .get_preset_name ())
119
+ cmake (" --build" , " --preset" , self .get_preset_name ())
121
120
122
121
123
122
def install (self , spec , prefix ):
124
123
"""Override the default install command to use CMake presets."""
125
- cmake = which (' cmake' )
126
- cmake (' --build' , ' --preset' , self .get_preset_name (), '-t' , ' install' )
124
+ cmake = which (" cmake" )
125
+ cmake (" --build" , " --preset" , self .get_preset_name (), "-t" , " install" )
127
126
128
127
def test (self , spec , prefix ):
129
128
"""Override the default test command to use CMake presets."""
130
- ctest = which (' ctest' )
131
- ctest (' --preset' , self .get_preset_name (), '-R' , ' qs_laplacian' )
129
+ ctest = which (" ctest" )
130
+ ctest (" --preset" , self .get_preset_name (), "-R" , " qs_laplacian" )
0 commit comments