Skip to content
Snippets Groups Projects
Commit 70fc7c71 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

moved se_util.hpp

parent 18cad2e7
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,64 @@ else
NVCCFLAGS+="$NVCCFLAGS -O3 "
fi
###### Check for se-class1
AC_MSG_CHECKING(whether to build with security enhancement class1)
se_class1=no
AC_ARG_ENABLE(se-class1,
AC_HELP_STRING(
[--enable-se-class1],
[enable security enhancement class1]
),
se_class1="$enableval"
)
AC_MSG_RESULT($se_class1)
if test x"$se_class1" = x"yes"; then
AC_DEFINE([SE_CLASS1],[],[Security enhancement class 1])
fi
###### Check for se-class 2
AC_MSG_CHECKING(whether to build with security enhancement class 2)
se_class2=no
AC_ARG_ENABLE(se-class2,
AC_HELP_STRING(
[--enable-se-class2],
[enable security enhancement class 2]
),
se_class2="$enableval"
)
AC_MSG_RESULT($se_class2)
if test x"$se_class2" = x"yes"; then
AC_DEFINE([SE_CLASS2],[],[Security enhancement class 2])
fi
###### Check for se-class 3
AC_MSG_CHECKING(whether to build with security enhancement class 3)
se_class3=no
AC_ARG_ENABLE(se-class3,
AC_HELP_STRING(
[--enable-se-class3],
[enable security enhancement class 3]
),
se_class3="$enableval"
)
AC_MSG_RESULT($se_class3)
if test x"$se_class3" = x"yes"; then
AC_DEFINE([SE_CLASS3],[],[Security enhancement class 3])
fi
##### CHECK FOR BOOST ##############
AX_BOOST([1.52],[],[])
......@@ -158,6 +216,21 @@ if [ test x"$debuger" = x"yes" ]; then
else
echo "* debug: no *"
fi
if [ test x"$se_class1" = x"yes" ]; then
echo "* se-class1: yes *"
else
echo "* se-class1: no *"
fi
if [ test x"$se_class2" = x"yes" ]; then
echo "* se-class2: yes *"
else
echo "* se-class2: no *"
fi
if [ test x"$se_class3" = x"yes" ]; then
echo "* se-class3: yes *"
else
echo "* se-class3: no *"
fi
if [ test x"$gpu_support" = x"no" ]; then
echo "* gpu: no *"
else
......
......@@ -38,7 +38,7 @@ static bool remove_ptr(const void * ptr)
// if the element does not exist, print that something wrong happened and return
if ( it == active_ptr.end() )
{
std::cout << "Error pointer not found " << ptr << "\n";
std::cout << "Error " << __FILE__ << ":" << __LINE__ << " pointer not found " << ptr << "\n";
ACTION_ON_ERROR(MEM_ERROR);
return false;
}
......
/*
* se_util.hpp
*
* Created on: Oct 22, 2015
* Author: i-bird
*/
#ifndef OPENFPM_DATA_SRC_UTIL_SE_UTIL_HPP_
#define OPENFPM_DATA_SRC_UTIL_SE_UTIL_HPP_
// Macro that decide what to do in case of error
#ifdef STOP_ON_ERROR
#define ACTION_ON_ERROR(error) exit(1);
#elif defined(THROW_ON_ERROR)
#define ACTION_ON_ERROR(error) if (!std::uncaught_exception()) throw error;
#else
#define ACTION_ON_ERROR(error)
#endif
#endif /* OPENFPM_DATA_SRC_UTIL_SE_UTIL_HPP_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment