163 def cmake_args(self):
164 spec = self.spec
165 options = []
166
167
168 options.extend([
169 '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
170 '-DMPI_RUN_FLAGS:STRING=--allow-run-as-root',
171 '-DWITH_SPACK:BOOL=YES',
172 '-DPETSC_DIR:PATH=%s' % spec['petsc'].prefix,
173 '-DPETSC_ARCH:STRING=',
174 '-DMOAB_DIR:PATH=%s' % spec['moab'].prefix,
175 '-DBOOST_DIR:PATH=%s' % spec['boost'].prefix,
176 '-DBLAS_DIR:PATH=%s' % spec['blas'].prefix])
177
178
179 if '+adol-c' in spec:
180 options.append('-DADOL-C_DIR:PATH=%s' % spec['adol-c'].prefix)
181
182 if '+tetgen' in spec:
183 options.append('-DTETGEN_DIR:PATH=%s' % spec['tetgen'].prefix)
184
185 if '+med' in spec:
186 options.append('-DMED_DIR:PATH=%s' % spec['med'].prefix)
187
188 if '+slepc' in spec:
189 options.append('-DSLEPC_DIR:PATH=%s' % spec['slepc'].prefix)
190
191 if '+mgis' in spec:
192 options.append('-DMGIS_DIR:PATH=%s' % spec['mgis'].prefix)
193 options.append('-DTFEL_DIR:PATH=%s' % spec['tfel'].prefix)
194
195
196 options.append(
197 self.define_from_variant(
198 'STAND_ALLONE_USERS_MODULES', 'copy_user_modules'))
199
200 options.append(
201 self.define_from_variant('BUILD_SHARED_LIBS', 'shared'))
202
203 if spec['boost'].satisfies('+shared'):
204 options.append(self.define('Boost_USE_STATIC_LIBS', False))
205 else:
206 options.append(self.define('Boost_USE_STATIC_LIBS', True))
207
208 options.append(
209 self.define_from_variant('BUILD_TUTORIALS', 'build_tutorials'))
210
211 return options
212