Skip to content

Commit

Permalink
* Updated GAMS build to use c++17 and to stop forcing mac in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
jredmondson authored and jredmondson committed Mar 25, 2023
1 parent 428efa2 commit 6357988
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions scripts/linux/base_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ GAMS=0
GAMSPULL=1
JAVA=0
LZ4=0
MAC=${MAC:-0}
MAC=0
MADARA=0
MADARAPULL=1
MPC=0
Expand All @@ -128,7 +128,6 @@ CLEAN=1
CLEAN_ENV=0
MADARAPULL=1
GAMSPULL=1
MAC=${MAC:-0}
BUILD_ERRORS=0
STRIP=0
TESTS=0
Expand All @@ -147,6 +146,8 @@ if [ -z $PYTHON_VERSION ] ; then
export PYTHON_VERSION="2.7"
fi

echo "MAC=$MAC"

CAPNP_AS_A_PREREQ=0
EIGEN_AS_A_PREREQ=0
GAMS_AS_A_PREREQ=0
Expand Down Expand Up @@ -789,7 +790,7 @@ if [ $PREREQS -eq 1 ] && [ $MAC -eq 0 ]; then
fi

sudo apt-get update
sudo apt-get install -y -f build-essential subversion git-core perl doxygen graphviz libboost-all-dev
sudo apt-get install -y -f build-essential git-core perl doxygen graphviz libboost-all-dev
sudo apt-get install -y -f autoconf automake libtool

if [ $CLANG -eq 1 ]; then
Expand Down Expand Up @@ -1974,7 +1975,7 @@ if [ $CAPNP_JAVA -eq 1 ]; then
cd $CAPNP_PREFIX/c++
make -j4
cd $CAPNP_JAVA_DIR
sed -i -e 's/c++11/c++14/g' $CAPNP_JAVA_DIR/Makefile
sed -i -e 's/c++11/c++17/g' $CAPNP_JAVA_DIR/Makefile
sed -i '/CAPNP_CXX_FLAGS=\$/d' $CAPNP_JAVA_DIR/Makefile
make -j4

Expand Down Expand Up @@ -2296,6 +2297,7 @@ fi
if [ $CMAKE -eq 1 ]; then

if [ $MAC -eq 0 ]; then
echo "Configuring non-mac cmake..."

if grep -q LD_LIBRARY_PATH $HOME/.gams/env.sh ; then
sed -i 's@LD_LIBRARY_PATH=.*@LD_LIBRARY_PATH='"\$LD_LIBRARY_PATH"':'"\$MADARA_ROOT/install/lib"':'"\$GAMS_ROOT/install/lib"':'"\$VREP_ROOT"':'"\$CAPNP_ROOT/c++/.libs"'@' $HOME/.gams/env.sh
Expand All @@ -2305,6 +2307,7 @@ if [ $CMAKE -eq 1 ]; then

else

echo "Configuring mac cmake..."
if grep -q DYLD_LIBRARY_PATH $HOME/.gams/env.sh ; then
sed -i 's@DYLD_LIBRARY_PATH=.*@DYLD_LIBRARY_PATH='"\$DYLD_LIBRARY_PATH"':'"\$MADARA_ROOT/install/lib"':'"\$GAMS_ROOT/install/lib"':'"\$VREP_ROOT"':'"\$CAPNP_ROOT/c++/.libs"'@' $HOME/.gams/env.sh
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/projects/common/using_madara.mpb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ project : debug_build, using_clang, using_boost, using_simtime, using_nothreadlo
}

verbatim (make, local, true) {
CPPFLAGS := -std=c++14 -O3 $(CPPFLAGS)
CPPFLAGS := -std=c++17 -O3 $(CPPFLAGS)
LDLIBS := $(LDLIBS) -lMADARA
}
}
2 changes: 1 addition & 1 deletion using_madara.mpb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ project : debug_build, using_clang, using_android, using_boost, using_simtime, u
}

verbatim (make, local, true) {
CPPFLAGS := -std=c++14 -O3 $(CPPFLAGS)
CPPFLAGS := -std=c++17 -O3 $(CPPFLAGS)
LDLIBS := $(LDLIBS) -lMADARA
}
}

0 comments on commit 6357988

Please # to comment.