enable mpi support

This commit is contained in:
Barry Haddow 2011-12-15 21:54:56 +00:00
parent a64bba48ad
commit fde9c37b26
2 changed files with 37 additions and 2 deletions

15
Jamroot
View File

@ -45,11 +45,11 @@
#
# debug-symbols=on|off include (default) or exclude debugging
# information also known as -g
#
# --notrace compiles without TRACE macros
#
# --enable-boost-pool uses Boost pools for the memory SCFG table
#
# --enable-mpi switch on mpi
#
#CONTROLLING THE BUILD
#-a to build from scratch
@ -137,6 +137,8 @@ rule boost_lib ( name macro ) {
boost_lib thread THREAD_DYN_DLL ;
boost_lib program_options PROGRAM_OPTIONS_DYN_LINK ;
boost_lib unit_test_framework TEST_DYN_LINK ;
boost_lib mpi MPI_DYN_LINK ;
boost_lib serialization SERIALIZATION_DYN_LINK ;
#Link normally to a library, but sometimes static isn't installed so fall back to dynamic.
rule external_lib ( name ) {
@ -153,11 +155,20 @@ if [ test_flags "-lSegfault" ] {
requirements += <library>SegFault ;
}
if [ option.get "enable-mpi" : : "yes" ] {
import mpi ;
using mpi ;
requirements += <define>MPI_ENABLE ;
requirements += <library>mpi ;
requirements += <library>boost_mpi ;
requirements += <library>boost_serialization ;
}
requirements += [ option.get "notrace" : <define>TRACE_ENABLE=1 ] ;
requirements += [ option.get "enable-boost-pool" : : <define>USE_BOOST_POOL ] ;
import os ;
cxxflags = [ os.environ "CXXFLAGS" ] ;
cflags = [ os.environ "CFLAGS" ] ;
ldflags = [ os.environ "LDFLAGS" ] ;

24
mira/MiraTest.cpp Normal file
View File

@ -0,0 +1,24 @@
/***********************************************************************
Moses - factored phrase-based language decoder
Copyright (C) 2010 University of Edinburgh
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
***********************************************************************/
//Supplies the main for the mira test module
#define BOOST_TEST_MODULE mira
#include <boost/test/unit_test.hpp>