diff options
| -rw-r--r-- | SConstruct | 77 | ||||
| -rw-r--r-- | decoder/Makefile.am | 4 | ||||
| -rw-r--r-- | environment/LocalConfig.pm | 2 | ||||
| -rw-r--r-- | klm/util/string_piece.hh | 5 | 
4 files changed, 42 insertions, 46 deletions
@@ -1,50 +1,22 @@ -#!/usr/bin/python - -# EXPERIMENTAL and HACKY version of cdec build in scons - -AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR',  -		      help='installation prefix') -AddOption('--with-boost', dest='boost', type='string', nargs=1, action='store', metavar='DIR', +AddOption('--prefix', +                  dest='prefix', +                  type='string', +                  nargs=1, +                  action='store', +                  metavar='DIR', +                  help='installation prefix') + +AddOption('--with-boost', +                  dest='boost', +                  type='string', +                  nargs=1, +                  action='store', +                  metavar='DIR',                    help='boost installation directory (if in a non-standard location)') -AddOption('--with-glc', dest='glc', type='string', nargs=1, action='store', metavar='DIR', -                  help='path to Global Lexical Coherence package (optional)') -AddOption('--efence', dest='efence', action='store_true', -                  help='use electric fence for debugging memory corruptions')  platform = ARGUMENTS.get('OS', Platform()) -include = Split('decoder utils klm mteval .') -env = Environment(PREFIX=GetOption('prefix'), -                      PLATFORM = platform, -#                      BINDIR = bin, -#                      INCDIR = include, -#                      LIBDIR = lib, -                      CPPPATH = include, -                      LIBPATH = [], -                      LIBS = Split('boost_program_options boost_serialization boost_thread z'), -		      CCFLAGS=Split('-g -O3')) - -boost = GetOption('boost') -if boost: -   print 'Using Boost at {0}'.format(boost) -   env.Append(CPPPATH=boost+'/include', -	      LIBPATH=boost+'/lib') - -if GetOption('efence'): -   env.Append(LIBS=Split('efence Segfault'))  srcs = [] - -# TODO: Get rid of config.h - -glc = GetOption('glc') -if glc: -   print 'Using Global Lexical Coherence package at {0}'.format(glc) -   env.Append(CCFLAGS='-DHAVE_GLC', -	      CPPPATH=[glc, glc+'/cdec']) -   srcs.append(glc+'/string_util.cc') -   srcs.append(glc+'/feature-factory.cc') -   srcs.append(glc+'/cdec/ff_glc.cc') -  for pattern in ['decoder/*.cc', 'decoder/*.c', 'klm/*/*.cc', 'utils/*.cc', 'mteval/*.cc']:      srcs.extend([ file for file in Glob(pattern)      		       if not 'test' in str(file) @@ -55,4 +27,25 @@ for pattern in ['decoder/*.cc', 'decoder/*.c', 'klm/*/*.cc', 'utils/*.cc', 'mtev  			  and 'fast_score.cc' not in str(file)  		]) +include = Split('decoder utils klm mteval .') +libPaths = [] + +boost = GetOption('boost') +if boost: +   include.append(boost+'/include') +   libPaths.append(boost+'/lib')	 + +glcDir = None +glcDir = '../GlobalLexicalCoherence' +if glcDir: +   include.append(glcDir) + +env = Environment(PREFIX=GetOption('prefix'), +                      PLATFORM = platform, +#                      BINDIR = bin, +                      INCDIR = include, +#                      LIBDIR = lib, +                      CPPPATH = [include, '.'], +                      LIBPATH = libPaths, +                      LIBS = Split('boost_program_options boost_serialization boost_thread z'))  env.Program(target='decoder/cdec', source=srcs) diff --git a/decoder/Makefile.am b/decoder/Makefile.am index e1dba497..9cf4c3c4 100644 --- a/decoder/Makefile.am +++ b/decoder/Makefile.am @@ -26,7 +26,7 @@ hg_test_SOURCES = hg_test.cc  hg_test_LDADD = $(GTEST_LDFLAGS) $(GTEST_LIBS) libcdec.a ../mteval/libmteval.a ../utils/libutils.a -lz  trule_test_SOURCES = trule_test.cc  trule_test_LDADD = $(GTEST_LDFLAGS) $(GTEST_LIBS) libcdec.a ../mteval/libmteval.a ../utils/libutils.a -lz -AM_CPPFLAGS = -W -Wno-sign-compare $(GTEST_CPPFLAGS) -I.. -I../mteval -I../utils -I../klm +AM_CPPFLAGS = -W -Wall -Wno-sign-compare $(GTEST_CPPFLAGS) -I.. -I../mteval -I../utils -I../klm  rule_lexer.cc: rule_lexer.l  	$(LEX) -s -CF -8 -o$@ $< @@ -82,5 +82,5 @@ libcdec_a_SOURCES = \  if GLC    # Until we build GLC as a library... -  libcdec_a_SOURCES += ff_glc.cc string_util.cc feature-factory.cc +  libcdec_a_SOURCES += ff_glc.cc  endif diff --git a/environment/LocalConfig.pm b/environment/LocalConfig.pm index d136610d..7b3d950c 100644 --- a/environment/LocalConfig.pm +++ b/environment/LocalConfig.pm @@ -37,7 +37,7 @@ my $CCONFIG = {      'HOST_REGEXP' => qr/^(thor|tyr)\.inf\.ed\.ac\.uk$/,    },    'Blacklight' => { -    'HOST_REGEXP' => qr/^(blacklight.psc.edu|bl1.psc.teragrid.org|bl0.psc.teragrid.org)$/, +    'HOST_REGEXP' => qr/^(tg-login1.blacklight.psc.teragrid.org|blacklight.psc.edu|bl1.psc.teragrid.org|bl0.psc.teragrid.org)$/,      'QSubMemFlag' => '-l pmem=',    },    'Barrow/Chicago' => { diff --git a/klm/util/string_piece.hh b/klm/util/string_piece.hh index e48ce3d9..2583db5e 100644 --- a/klm/util/string_piece.hh +++ b/klm/util/string_piece.hh @@ -48,7 +48,10 @@  #ifndef BASE_STRING_PIECE_H__  #define BASE_STRING_PIECE_H__ -#include "util/have.hh" +//Uncomment this line if you use ICU in your code.   +//#define HAVE_ICU +//Uncomment this line if you want boost hashing for your StringPieces. +//#define HAVE_BOOST  #ifdef HAVE_BOOST  #include <boost/functional/hash/hash.hpp>  | 
