Fix for building osu-micro-benchmarks on OS X (librt not avaialble/required) (#4675)

* Fix for building osu-micro-benchmarks on OS X (librt not available/required)

* Fixed typo and replaced extend by append
This commit is contained in:
Pramod S Kumbhar 2017-07-05 20:31:26 +02:00 committed by Adam J. Stewart
parent 09681f721d
commit bf195cd8b9

View File

@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
import sys
class OsuMicroBenchmarks(Package):
@ -46,7 +47,6 @@ def install(self, spec, prefix):
config_args = [
'CC=%s' % spec['mpi'].prefix.bin + '/mpicc',
'CXX=%s' % spec['mpi'].prefix.bin + '/mpicxx',
'LDFLAGS=-lrt',
'--prefix=%s' % prefix
]
@ -56,6 +56,10 @@ def install(self, spec, prefix):
'--with-cuda=%s' % spec['cuda'].prefix,
])
# librt not available on darwin (and not required)
if not sys.platform == 'darwin':
config_args.append('LDFLAGS=-lrt')
configure(*config_args)
make()