v0.15.5
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
package.MofemUsersModules Class Reference
Inheritance diagram for package.MofemUsersModules:
[legend]
Collaboration diagram for package.MofemUsersModules:
[legend]

Public Member Functions

 setup_build_environment (self, env)
 
 build_directory (self)
 
 cmake_args (self)
 
 copy_source_code (self)
 
 check (self)
 

Public Attributes

 build_directory
 

Static Public Attributes

str homepage = "http://mofem.eng.gla.ac.uk"
 
str git = "https://likask@bitbucket.org/mofem/users-modules-cephas.git"
 
 branch
 
 tag
 
 commit
 
list maintainers = ['likask']
 
 default
 
 description
 
 False
 
 when
 
 True
 

Detailed Description

MofemUsersModules creates installation environment for user-provided
modules and extends of mofem-cephas package. For more information how to
work with Spack and MoFEM see
http://mofem.eng.gla.ac.uk/mofem/html/install_spack.html

Definition at line 10 of file package.py.

Member Function Documentation

◆ build_directory()

package.MofemUsersModules.build_directory (   self)

Definition at line 144 of file package.py.

144 def build_directory(self):
145 spec = self.spec
146 build_type = spec.variants['build_type'].value
147 build_dir = 'um-build-%s-%s' % (build_type,spec.dag_hash(7))
148 if '+docker' in spec:
149 return join_path('/mofem_install',build_dir)
150 else:
151 return join_path(self.stage.path, build_dir)
152

◆ check()

package.MofemUsersModules.check (   self)
Searches the CMake-generated Makefile for the target ``test``
and runs it if found.

Definition at line 201 of file package.py.

201 def check(self):
202 """Searches the CMake-generated Makefile for the target ``test``
203 and runs it if found.
204 """
205 with working_dir(self.build_directory):
206 ctest(parallel=False)

◆ cmake_args()

package.MofemUsersModules.cmake_args (   self)

Definition at line 153 of file package.py.

153 def cmake_args(self):
154 spec = self.spec
155 from_variant = self.define_from_variant
156
157 options = []
158
159 # obligatory options
160 options.extend([
161 '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
162 '-DMPI_RUN_FLAGS=--allow-run-as-root',
163 '-DWITH_SPACK=YES'])
164
165 options.append(self.define(
166 'MOFEM_DIR', spec['mofem-cephas'].prefix.users_module))
167 options.append(self.define_from_variant(
168 'STAND_ALLONE_USERS_MODULES', 'copy_user_modules'))
169 options.append(
170 self.define_from_variant('BUILD_SHARED_LIBS', 'shared'))
171
172 options.append(
173 from_variant('BUILD_BASIC_FINITE_ELEMENTS', 'basic_fe'))
174 options.append(
175 from_variant('BUILD_TUTORIALS', 'basic_tutorials'))
176
177 for name, v in spec.variants.items():
178 if (name.startswith('build_tut_')):
179 if '+basic_tutorials' in spec:
180 options.append(
181 from_variant(name.upper(), name))
182 else:
183 options.append(
184 from_variant(name.upper(), 'basic_tutorials'))
185
186
187 return options
188

◆ copy_source_code()

package.MofemUsersModules.copy_source_code (   self)

Definition at line 196 of file package.py.

196 def copy_source_code(self):
197 source = self.stage.source_path
198 prefix = self.prefix
199 install_tree(source, prefix.users_modules)
200

◆ setup_build_environment()

package.MofemUsersModules.setup_build_environment (   self,
  env 
)

Definition at line 140 of file package.py.

140 def setup_build_environment(self, env):
141 env.set('CTEST_OUTPUT_ON_FAILURE', '1')
142

Member Data Documentation

◆ branch

package.MofemUsersModules.branch
static

Definition at line 19 of file package.py.

◆ build_directory

package.MofemUsersModules.build_directory

Definition at line 205 of file package.py.

◆ commit

package.MofemUsersModules.commit
static

Definition at line 36 of file package.py.

◆ default

package.MofemUsersModules.default
static

Definition at line 54 of file package.py.

◆ description

package.MofemUsersModules.description
static

Definition at line 55 of file package.py.

◆ False

package.MofemUsersModules.False
static

Definition at line 58 of file package.py.

◆ git

str package.MofemUsersModules.git = "https://likask@bitbucket.org/mofem/users-modules-cephas.git"
static

Definition at line 17 of file package.py.

◆ homepage

str package.MofemUsersModules.homepage = "http://mofem.eng.gla.ac.uk"
static

Definition at line 16 of file package.py.

◆ maintainers

list package.MofemUsersModules.maintainers = ['likask']
static

Definition at line 52 of file package.py.

◆ tag

package.MofemUsersModules.tag
static

Definition at line 35 of file package.py.

◆ True

package.MofemUsersModules.True
static

Definition at line 97 of file package.py.

◆ when

package.MofemUsersModules.when
static

Definition at line 62 of file package.py.


The documentation for this class was generated from the following file: