Skip to content

Commit

Permalink
Add compilation for NPLM in compile_query_only.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kpu committed Nov 5, 2013
1 parent c25327b commit cb84ab8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion compile_query_only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ rm {lm,util}/*.o 2>/dev/null
set -e

CXX=${CXX:-g++}

CXXFLAGS+=" -I. -O3 -DNDEBUG -DKENLM_MAX_ORDER=6"

#If this fails for you, consider using bjam.
if [ ${#NPLM} != 0 ]; then
CXXFLAGS+=" -DHAVE_NPLM -lneuralLM -L$NPLM/src -I$NPLM/src -lboost_thread-mt -fopenmp"
ADDED_PATHS="lm/wrappers/*.cc"
fi
echo 'Compiling with '$CXX $CXXFLAGS

#Grab all cc files in these directories except those ending in test.cc or main.cc
objects=""
for i in util/double-conversion/*.cc util/*.cc lm/*.cc; do
for i in util/double-conversion/*.cc util/*.cc lm/*.cc $ADDED_PATHS; do
if [ "${i%test.cc}" == "$i" ] && [ "${i%main.cc}" == "$i" ]; then
$CXX $CXXFLAGS -c $i -o ${i%.cc}.o
objects="$objects ${i%.cc}.o"
Expand Down

0 comments on commit cb84ab8

Please sign in to comment.