fiddle with fortran
This commit is contained in:
parent
eb5b0767aa
commit
7897f10126
@ -68,7 +68,7 @@ def install(self, spec, prefix):
|
||||
'-DTPL_ENABLE_Boost:BOOL=ON',
|
||||
'-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include,
|
||||
'-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib,
|
||||
'-DTrilinos_ENABLE_Fortran=OFF', # FIXME
|
||||
# '-DTrilinos_ENABLE_Fortran=OFF', # FIXME
|
||||
'-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON',
|
||||
'-DTrilinos_ENABLE_CXX11:BOOL=ON',
|
||||
'-DTrilinos_CXX11_FLAGS=-std=c++11',
|
||||
@ -79,10 +79,17 @@ def install(self, spec, prefix):
|
||||
# Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS
|
||||
'-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name
|
||||
'-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'),
|
||||
'-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90'),
|
||||
# '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' # FIXME
|
||||
'-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90')
|
||||
])
|
||||
|
||||
# Fortran lib
|
||||
libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read())
|
||||
#os.environ['LDFLAGS'] = '-L%s -lgfortran' % libgfortran
|
||||
options.extend([
|
||||
'-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran',
|
||||
'-DCMAKE_EXE_LINKER_FLAGS:STRING=-L%s -lgfortran' % libgfortran
|
||||
])
|
||||
|
||||
# for build-debug only:
|
||||
options.extend([
|
||||
'-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE'
|
||||
@ -150,10 +157,10 @@ def install(self, spec, prefix):
|
||||
'-DTrilinos_ENABLE_STK=OFF'
|
||||
])
|
||||
|
||||
if self.compiler.name == "clang":
|
||||
options.extend([
|
||||
'-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments'
|
||||
])
|
||||
#if self.compiler.name == "clang":
|
||||
# options.extend([
|
||||
# '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments'
|
||||
# ])
|
||||
|
||||
with working_dir('spack-build', create=True):
|
||||
cmake('..', *options)
|
||||
|
Loading…
Reference in New Issue
Block a user