Added gtest to Cantera's application environment.
This commit is contained in:
parent
2be392e6e1
commit
287de5e1fb
2 changed files with 27 additions and 5 deletions
|
|
@ -952,6 +952,7 @@ elif env['layout'] == 'debian':
|
|||
else:
|
||||
env['PYTHON_INSTALLER'] = 'direct'
|
||||
|
||||
|
||||
addInstallActions = ('install' in COMMAND_LINE_TARGETS or
|
||||
'uninstall' in COMMAND_LINE_TARGETS)
|
||||
|
||||
|
|
|
|||
|
|
@ -151,11 +151,32 @@ for subdir, extensions, prepFunction in libs:
|
|||
# Build the shared library
|
||||
liby = build(localenv.SharedLibrary(pjoin('..', 'lib', sharedLibName), objects))
|
||||
install('$inst_libdir', liby)
|
||||
|
||||
|
||||
# ---------------------------------------------------
|
||||
# GTEST
|
||||
# ---------------------------------------------------
|
||||
# OK, handle the construction of the gtest library. Gtest applications require the construction of
|
||||
# a library object that will get linked in at link time and a set of include files that will available
|
||||
# at compile time.
|
||||
#
|
||||
# Create a local environment for creating the libgtest.a static library
|
||||
# -> we need to the gtest include files
|
||||
# -> I don't know about pthreads within gtest.
|
||||
localenv = env.Clone()
|
||||
localenv.Prepend(CPPPATH=[Dir('#ext/gtest'),
|
||||
Dir('#ext/gtest/include')],
|
||||
CPPDEFINES={'GTEST_HAS_PTHREAD': 0})
|
||||
build(localenv.Library(pjoin('../lib', 'gtest'),
|
||||
source=['gtest/src/gtest-all.cc']))
|
||||
CPPDEFINES={'GTEST_HAS_PTHREAD': 0})
|
||||
#
|
||||
# Create a build object for libgtest.a and a source file, gtest-all.cc that includes all of the gtest sources
|
||||
#
|
||||
llib = build(localenv.Library(pjoin('../lib', 'gtest'),
|
||||
source=['gtest/src/gtest-all.cc']))
|
||||
#
|
||||
# Add libgtest.a to the install directions
|
||||
#
|
||||
install('$inst_libdir', llib)
|
||||
#
|
||||
# Add all of the gtest include files to the install directions
|
||||
#
|
||||
install(localenv.RecursiveInstall, '$inst_incroot', '#/ext/gtest/include')
|
||||
# ---------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue