check if default gcc is version 5 and if so add c++/5/experimental to resolve build fails in ubuntu 16.04 that uses gcc 5
@@ -80,9 +80,20 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
BUILDTYPE="Release"
echo rm -rf $BUILD_AOMP/build/rocdbgapi
rm -rf $BUILD_AOMP/build/rocdbgapi
+ CMAKE_WITH_EXPERIMENTAL=""
+ if [ -d "/usr/include/c++/5/experimental" ] ; then
+ _loc=`which gcc`
+ if [ "$_loc" != "" ] ; then
+ _gccver=`$_loc --version | grep gcc | cut -d")" -f2 | cut -d"." -f1`
+ if [ "$_gccver" == "5" ] ; then
+ CMAKE_WITH_EXPERIMENTAL="-DCMAKE_CXX_FLAGS=-I/usr/include/c++/5/experimental"
+ fi
+ fi
+ fi
MYCMAKEOPTS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$INSTALL_ROCDBGAPI \
-DCMAKE_PREFIX_PATH=$AOMP_INSTALL_DIR;$INSTALL_ROCDBGAPI/include \
+ $CMAKE_WITH_EXPERIMENTAL \
$AOMP_ORIGIN_RPATH"
mkdir -p $BUILD_AOMP/build/rocdbgapi
cd $BUILD_AOMP/build/rocdbgapi
