From 1969a4d39958faa44835f8366af1dda7c7f0c41e Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sun, 1 Sep 2013 00:33:32 +0000 Subject: [PATCH] [SCons] Add configuration option for specifying required Boost libraries. The set of Boost libraries which are required by Cantera, through the use of Boost.Thread, depends on the Boost version. The static libraries are needed when compiling anything that links to Cantera, so these libraries are copied to the Cantera installation directory on Windows, where compiling Boost from source is a burden. --- SConstruct | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 105802d30..189fec74d 100644 --- a/SConstruct +++ b/SConstruct @@ -523,6 +523,11 @@ config_options = [ ('boost_thread_lib', 'The name of the Boost.Thread library.', 'boost_thread'), + ('boost_windows_libs', + """Comma-separated list containing the names of the Boost libraries + required to link Cantera programs on Windows. These libraries will be + copied to the Cantera installation directory.""", + 'thread,system,date_time,chrono'), # default is correct for Boost 1.54 BoolVariable( 'build_with_f2c', """For external procedures written in Fortran 77, both the @@ -1287,9 +1292,9 @@ if addInstallActions: if env['CC'] == 'cl' and env['use_boost_libs']: boost_suffix = '-vc%s-mt-%s.lib' % (env['MSVC_VERSION'].replace('.',''), env['BOOST_LIB_VERSION']) - install('$inst_libdir', pjoin('$boost_lib_dir', 'libboost_date_time' + boost_suffix)) - install('$inst_libdir', pjoin('$boost_lib_dir', 'libboost_thread' + boost_suffix)) - + for lib in env['boost_windows_libs'].split(','): + install('$inst_libdir', pjoin('$boost_lib_dir', + 'libboost_{0}{1}'.format(lib, boost_suffix))) ### List of libraries needed to link to Cantera ### linkLibs = ['cantera']