Update Armadillo version; Better detection of clang; Add some preprocessor directives.

This commit is contained in:
CismonX 2019-10-05 23:16:48 +08:00
parent d8d37f24a9
commit af6e0c53f5
5 changed files with 14 additions and 2 deletions

View File

@ -10,7 +10,7 @@ php:
env:
global:
- ARMA_VERSION="9.700.2"
- ARMA_VERSION="9.700.3"
- ARMA_SRC="http://sourceforge.net/projects/arma/files/armadillo-${ARMA_VERSION}.tar.xz"
before_install:

View File

@ -32,7 +32,7 @@ if test "$PHP_ARMA" != "no"; then
# Include PCH file if valid.
EXTRA_CXXFLAGS="-std=c++17 -DARMA_DONT_PRINT_ERRORS"
CLANG_TEST_STR=`$CXX --version | grep clang`
CLANG_TEST_STR=`echo | $CXX -dM -E - | grep __clang__`
if test -f "$PCH_FILE"; then
if test -n "$CLANG_TEST_STR"; then
EXTRA_CXXFLAGS+=" -include-pch $PCH_FILE"

View File

@ -10,6 +10,8 @@
#include "php_arma.hh"
#include "complex.hh"
#ifdef PHP_ARMA_OPERATORS
#define PHP_ARMA_BASE_OPERATOR_EX2(cls, type, func) \
PHP_ARMA_OPERATOR_EX2((base<type, cls<type>>), cls<type>, func)
@ -38,6 +40,8 @@
PHP_ARMA_BASE_ASSIGN_OPERATOR_EX(subview_mat, func) \
PHP_ARMA_OPERATOR_END()
#endif // PHP_ARMA_OPERATORS
namespace php_arma
{
template <typename T, typename ChildT>

View File

@ -10,6 +10,8 @@
#include "php_arma.hh"
#include "complex.hh"
#ifdef PHP_ARMA_OPERATORS
#define PHP_ARMA_DENSE_OPERATOR_EX2(cls, type, func) \
PHP_ARMA_OPERATOR_EX2((dense<type, cls<type>>), cls<type>, func)
@ -24,6 +26,8 @@
PHP_ARMA_DENSE_OPERATOR_EX(subview_mat, func) \
PHP_ARMA_OPERATOR_END()
#endif // PHP_ARMA_OPERATORS
namespace php_arma
{
template <typename T, typename ChildT>

View File

@ -9,6 +9,8 @@
#include "php_arma.hh"
#ifdef PHP_ARMA_OPERATORS
#define PHP_ARMA_MAPVAL_OPERATOR_EX(type, func) \
PHP_ARMA_OPERATOR_EX(mapval_dense <type>, func) \
PHP_ARMA_OPERATOR_EX(mapval_spmat <type>, func) \
@ -21,6 +23,8 @@
PHP_ARMA_MAPVAL_OPERATOR_EX(cx_double, func) \
PHP_ARMA_OPERATOR_END()
#endif // PHP_ARMA_OPERATORS
namespace php_arma
{
template <typename T, bool IsSparse, bool IsSubview>