Explorar o código

port r17882 from 1.2: Fix build with simgrid 3.12 & 3.13

Samuel Thibault %!s(int64=9) %!d(string=hai) anos
pai
achega
edd3c4cf8f
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      configure.ac

+ 10 - 0
configure.ac

@@ -1096,6 +1096,16 @@ if test x$enable_simgrid = xyes ; then
 	AC_DEFINE(STARPU_SIMGRID, 1, [Define this to enable simgrid execution])
 	# We won't bind or detect anything
 	with_hwloc=no
+
+	# Simgrid 3.12 & 3.13 need -std=c++11 to be able to build anything in C++...
+	AC_LANG_PUSH([C++])
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+			  #include <simgrid/msg.h>
+			  #include <simgrid/host.h>
+			  ]]),],,
+			  CXXFLAGS="-std=c++11 $CXXFLAGS"
+			  NVCCFLAGS="-std=c++11 $NVCCFLAGS")
+	AC_LANG_POP([C++])
 fi
 AM_CONDITIONAL(STARPU_SIMGRID, test x$enable_simgrid = xyes)
 AC_SUBST(SIMGRID_CFLAGS)