I recently received an e-mail from Cristian Vlasceanu (the developer
of the excellent Linux Zero debugger) who developed an autotools macro
to detect compiler lambda capability. I know its not exactly runtime
detection, but perhaps it can help someone to create a CMake compiler
SSE capability detector.
<quote>
# Check for C++12 lambda support in the compiler
AC_DEFUN([AC_CXX_LAMBDA],
[AC_CACHE_CHECK([for C++11 Lambda compiler support],
[ac_cv_lambda],
[ac_cv_lambda=false
cat > tmp.cpp << ---end---
int main()
{
return [[]]()->int { return 0; }();
}
---end---
if $CXX -std=c++0x tmp.cpp 2>/dev/null; then
ac_cv_lambda=true
rm a.out
fi
rm tmp.cpp])
if test "$ac_cv_lambda" = true; then
AC_DEFINE([HAVE_LAMBDA_SUPPORT], [1],
[Define if C++11 lambda functions are supported])
fi
])
AC_CXX_LAMBDA
</quote>
Best regards,
-Tom
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel