summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/CMakeLists.txt8
-rw-r--r--indra/llmath/llcalcparser.h4
-rw-r--r--indra/llmath/llsimdmath.h6
-rw-r--r--indra/llmath/llvolume.cpp4
4 files changed, 19 insertions, 3 deletions
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index eb29df245a..c85d9c75c7 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -59,6 +59,7 @@ set(llmath_HEADER_FILES
llmath.h
llmatrix3a.h
llmatrix3a.inl
+ llmatrix4a.h
llmodularmath.h
lloctree.h
llperlin.h
@@ -102,6 +103,13 @@ add_library (llmath ${llmath_SOURCE_FILES})
target_link_libraries(llmath llcommon llmeshoptimizer)
target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+if (USESYSTEMLIBS AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ set_source_files_properties(llcalc.cpp PROPERTIES
+ COMPILE_FLAGS -Wno-dangling-pointer)
+endif ()
+
+include(LibraryInstall)
+
# Add tests
if (LL_TESTS)
include(LLAddBuildTest)
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index e8fdcc9ae3..569ae4a498 100644
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -131,14 +131,14 @@ struct LLCalcParser : grammar<LLCalcParser>
power =
unary_expr[power.value = arg1] >>
- *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&powf)(power.value, arg1)]))
+ *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind<float, float, float>(&powf)(power.value, arg1)]))
;
term =
power[term.value = arg1] >>
*(('*' >> assert_syntax(power[term.value *= arg1])) |
('/' >> assert_syntax(power[term.value /= arg1])) |
- ('%' >> assert_syntax(power[term.value = phoenix::bind(&fmodf)(term.value, arg1)]))
+ ('%' >> assert_syntax(power[term.value = phoenix::bind<float, float, float>(&fmodf)(term.value, arg1)]))
)
;
diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h
index 40953dc2e8..590d8de92f 100644
--- a/indra/llmath/llsimdmath.h
+++ b/indra/llmath/llsimdmath.h
@@ -31,7 +31,7 @@
#error "Please include llmath.h before this file."
#endif
-#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) )
+#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__ || __ARM_NEON) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) )
#error SSE2 not enabled. LLVector4a and related class will not compile.
#endif
@@ -39,8 +39,12 @@
#include <stdint.h>
#endif
+#if defined(__i386__) || defined(__x86_64__)
#include <xmmintrin.h>
#include <emmintrin.h>
+#else
+#include <sse2neon.h>
+#endif
#include "llmemory.h"
#include "llsimdtypes.h"
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 9375a5dfca..c7aec52698 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -56,7 +56,11 @@
#include "mikktspace/mikktspace.h"
#include "mikktspace/mikktspace.c" // insert mikktspace implementation into llvolume object file
+#if LL_USESYSTEMLIBS
+#include <meshoptimizer.h>
+#else
#include "meshoptimizer/meshoptimizer.h"
+#endif
#define DEBUG_SILHOUETTE_BINORMALS 0
#define DEBUG_SILHOUETTE_NORMALS 0 // TomY: Use this to display normals using the silhouette