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',
|
'-DTPL_ENABLE_Boost:BOOL=ON',
|
||||||
'-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include,
|
'-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include,
|
||||||
'-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib,
|
'-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_EXPLICIT_INSTANTIATION:BOOL=ON',
|
||||||
'-DTrilinos_ENABLE_CXX11:BOOL=ON',
|
'-DTrilinos_ENABLE_CXX11:BOOL=ON',
|
||||||
'-DTrilinos_CXX11_FLAGS=-std=c++11',
|
'-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
|
# 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_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name
|
||||||
'-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'),
|
'-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'),
|
||||||
'-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90'),
|
'-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90')
|
||||||
# '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' # FIXME
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# 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:
|
# for build-debug only:
|
||||||
options.extend([
|
options.extend([
|
||||||
'-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE'
|
'-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE'
|
||||||
@ -150,10 +157,10 @@ def install(self, spec, prefix):
|
|||||||
'-DTrilinos_ENABLE_STK=OFF'
|
'-DTrilinos_ENABLE_STK=OFF'
|
||||||
])
|
])
|
||||||
|
|
||||||
if self.compiler.name == "clang":
|
#if self.compiler.name == "clang":
|
||||||
options.extend([
|
# options.extend([
|
||||||
'-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments'
|
# '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments'
|
||||||
])
|
# ])
|
||||||
|
|
||||||
with working_dir('spack-build', create=True):
|
with working_dir('spack-build', create=True):
|
||||||
cmake('..', *options)
|
cmake('..', *options)
|
||||||
|
Loading…
Reference in New Issue
Block a user