Skip to content
Permalink
Browse files

* Added support for no_karl option to GAMS

  * This breaks certain algorithms that depend on KARL evaluations when no_karl is enabled
  * It also reduces the size of MADARA lib and removes certain RTTI dependencies
  • Loading branch information...
jredmondson committed Mar 8, 2019
1 parent b28fb77 commit 12db947bf29f547916933c41962bdd627858b424
@@ -162,7 +162,6 @@ script:
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_elections; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_groups; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_location; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_mape_loop; fi
- if [ ! -z $TESTS ] && [ "$ROS" == "ros" ]; then $GAMS_ROOT/bin/test_ros2gams; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_utility; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_variables; fi
@@ -44,6 +44,10 @@ android = 0
/// Enable this feature if you want to compile with OpenJDK (requires java=1)
openjdk = 0

/// @feature no_karl
/// Enable this feature if you do not need to evaluate KaRL scripts
no_karl = 0

/// @feature docs
/// Enable this feature if you want to generate documentation
docs = 0
@@ -0,0 +1,3 @@
feature (no_karl) {
macros += _MADARA_NO_KARL_
}
@@ -1183,7 +1183,7 @@ if [ $MADARA -eq 1 ] || [ $MADARA_AS_A_PREREQ -eq 1 ]; then
fi

if [ $NOKARL -eq 1 ] ; then
echo "REMOVING KARL EXPRESSION EVALUATION"
echo "REMOVING KARL EXPRESSION EVALUATION FROM MADARA BUILD"
fi

cd $MADARA_ROOT
@@ -1300,12 +1300,16 @@ if [ $GAMS -eq 1 ] || [ $GAMS_AS_A_PREREQ -eq 1 ]; then
fi

fi


if [ $NOKARL -eq 1 ] ; then
echo "REMOVING KARL EXPRESSION EVALUATION FROM GAMS BUILD"
fi

cd $GAMS_ROOT

echo "GENERATING GAMS PROJECT"
echo "perl $MPC_ROOT/mwc.pl -type make -features airlib=$AIRLIB,java=$JAVA,ros=$ROS,types=$TYPES,vrep=$VREP,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,simtime=$SIMTIME,debug=$DEBUG,warnings=$WARNINGS gams.mwc"
perl $MPC_ROOT/mwc.pl -type make -features airlib=$AIRLIB,java=$JAVA,ros=$ROS,python=$PYTHON,types=$TYPES,vrep=$VREP,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,simtime=$SIMTIME,debug=$DEBUG,warnings=$WARNINGS gams.mwc
echo "perl $MPC_ROOT/mwc.pl -type make -features no_karl=$NOKARL,airlib=$AIRLIB,java=$JAVA,ros=$ROS,types=$TYPES,vrep=$VREP,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,simtime=$SIMTIME,debug=$DEBUG,warnings=$WARNINGS gams.mwc"
perl $MPC_ROOT/mwc.pl -type make -features no_karl=$NOKARL,airlib=$AIRLIB,java=$JAVA,ros=$ROS,python=$PYTHON,types=$TYPES,vrep=$VREP,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,simtime=$SIMTIME,debug=$DEBUG,warnings=$WARNINGS gams.mwc

if [ $TYPES -eq 1 ]; then
# Strip the unnecessary NOTPARALLEL: directives
@@ -1319,10 +1323,10 @@ if [ $GAMS -eq 1 ] || [ $GAMS_AS_A_PREREQ -eq 1 ]; then
fi

echo "BUILDING GAMS"
echo "make depend airlib=$AIRLIB java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID simtime=$SIMTIME docs=$DOCS warnings=$WARNINGS -j $CORES"
make depend airlib=$AIRLIB java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID simtime=$SIMTIME docs=$DOCS warnings=$WARNINGS -j $CORES
echo "make airlib=$AIRLIB java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID simtime=$SIMTIME docs=$DOCS warnings=$WARNINGS -j $CORES"
make airlib=$AIRLIB java=$JAVA ros=$ROS types=$TYPES vrep=$VREP python=$PYTHON tests=$TESTS android=$ANDROID simtime=$SIMTIME docs=$DOCS warnings=$WARNINGS -j $CORES
echo "make depend no_karl=$NOKARL airlib=$AIRLIB java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID simtime=$SIMTIME docs=$DOCS warnings=$WARNINGS -j $CORES"
make depend no_karl=$NOKARL airlib=$AIRLIB java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID simtime=$SIMTIME docs=$DOCS warnings=$WARNINGS -j $CORES
echo "make no_karl=$NOKARL airlib=$AIRLIB java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID simtime=$SIMTIME docs=$DOCS warnings=$WARNINGS -j $CORES"
make no_karl=$NOKARL airlib=$AIRLIB java=$JAVA ros=$ROS types=$TYPES vrep=$VREP python=$PYTHON tests=$TESTS android=$ANDROID simtime=$SIMTIME docs=$DOCS warnings=$WARNINGS -j $CORES
GAMS_BUILD_RESULT=$?

if [ ! -f $GAMS_ROOT/lib/libGAMS.so ]; then
@@ -672,8 +672,10 @@ int main(int argc, char ** argv)
// read madara initialization
if (madara_commands != "")
{
#ifndef _MADARA_NO_KARL_
controller.evaluate(madara_commands,
madara::knowledge::EvalSettings(false, true));
#endif
}

// set debug levels if they have been set through command line
Oops, something went wrong.

0 comments on commit 12db947

Please sign in to comment.
You can’t perform that action at this time.