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