From 2babcb4af56e6b7fb443f1b78002dc9e61e891c7 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 23 Feb 2012 21:02:46 +0200 Subject: Linux build fix. Moved type casts from protected base classes to derived LLCoord. --- indra/llmath/llcoord.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llcoord.h b/indra/llmath/llcoord.h index 1f617e649e..a66f3c7424 100644 --- a/indra/llmath/llcoord.h +++ b/indra/llmath/llcoord.h @@ -26,6 +26,15 @@ #ifndef LL_LLCOORD_H #define LL_LLCOORD_H +template class LLCoord; +struct LL_COORD_TYPE_GL; +struct LL_COORD_TYPE_WINDOW; +struct LL_COORD_TYPE_SCREEN; + +typedef LLCoord LLCoordGL; +typedef LLCoord LLCoordWindow; +typedef LLCoord LLCoordScreen; + struct LLCoordCommon { LLCoordCommon(S32 x, S32 y) : mX(x), mY(y) {} @@ -62,6 +71,8 @@ public: bool operator==(const self_t& other) const { return mX == other.mX && mY == other.mY; } bool operator!=(const self_t& other) const { return !(*this == other); } + static const self_t& getTypedCoords(const COORD_FRAME& self) { return static_cast(self); } + static self_t& getTypedCoords(COORD_FRAME& self) { return static_cast(self); } }; struct LL_COORD_TYPE_GL @@ -70,13 +81,13 @@ struct LL_COORD_TYPE_GL LLCoordCommon convertToCommon() const { - const LLCoord& self = static_cast&>(*this); + const LLCoordGL& self = LLCoordGL::getTypedCoords(*this); return LLCoordCommon(self.mX, self.mY); } void convertFromCommon(const LLCoordCommon& from) { - LLCoord& self = static_cast&>(*this); + LLCoordGL& self = LLCoordGL::getTypedCoords(*this); self.mX = from.mX; self.mY = from.mY; } @@ -98,8 +109,4 @@ struct LL_COORD_TYPE_SCREEN void convertFromCommon(const LLCoordCommon& from); }; -typedef LLCoord LLCoordGL; -typedef LLCoord LLCoordWindow; -typedef LLCoord LLCoordScreen; - #endif -- cgit v1.2.3 From a1a1410d25c3e4ff87e33344b416b7a827cdb1c2 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Mon, 27 Aug 2012 18:16:47 -0700 Subject: Skipping the realloc alignment test on Linux as the ll_aligned_malloc_16() function is not implemented to ensure alignment on Linux. --- indra/llmath/tests/alignment_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llmath') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index ac0c45ae6f..49c668d737 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -78,8 +78,12 @@ void alignment_test_object_t::test<1>() align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a)); ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16)); +#if !LL_LINUX + // Skipping realloc alignment test on Linux because the ll_aligned_realloc_16() + // function is not implemented to ensure alignment on Linux (see llmemory.h) align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a)); ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16)); +#endif // LL_LINUX ll_aligned_free_16(align_ptr); -- cgit v1.2.3 From 8ba2b388769e245ec1b49b7d6d4b0372d684ff86 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 13 Sep 2012 10:25:48 +0000 Subject: Fleshed out target_link_libraries dependencies between libraries. Appearance utility now reads avatar_lad.xml during stubbed out params processing. --- indra/llmath/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llmath') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 5865ae030c..a06dea2e9a 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -99,6 +99,10 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) +target_link_libraries(llmath + ${LLCOMMON_LIBRARIES} + ) + # Add tests if (LL_TESTS) include(LLAddBuildTest) -- cgit v1.2.3 From 3d5e24d135bd5d2636f075f9ef12ffba2129c61f Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Fri, 21 Sep 2012 17:32:28 -0700 Subject: Adding the CXX to each CMake project definition. --- indra/llmath/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 5865ae030c..d4898c49c6 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -1,6 +1,6 @@ # -*- cmake -*- -project(llmath) +project(llmath CXX) include(00-Common) include(LLCommon) -- cgit v1.2.3 From 0ca59987843cfcaedb12592b9466567ef421c4e8 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Wed, 3 Oct 2012 17:53:28 -0700 Subject: Backed out changeset: eb957fafe167 --- indra/llmath/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index d4898c49c6..5865ae030c 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -1,6 +1,6 @@ # -*- cmake -*- -project(llmath CXX) +project(llmath) include(00-Common) include(LLCommon) -- cgit v1.2.3 From c06c35609c6683731eaea283468f6b32af18fea2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 11 Oct 2012 00:09:04 +0000 Subject: Updating linux build to gcc4.6 --- indra/llmath/llvolume.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 53d56e96da..81c52d370b 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6348,12 +6348,7 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) S32 max_t = volume->getPath().mPath.size(); // S32 i; - S32 num_vertices = 0, num_indices = 0; S32 grid_size = (profile.size()-1)/4; - S32 quad_count = (grid_size * grid_size); - - num_vertices = (grid_size+1)*(grid_size+1); - num_indices = quad_count * 4; LLVector4a& min = mExtents[0]; LLVector4a& max = mExtents[1]; -- cgit v1.2.3 From a039b7c489885784fe779d05670825b316fa13d4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 11 Oct 2012 13:29:36 -0400 Subject: Fixes for build issues, missing LLCOMMON_SYSTEM_INCLUDE_DIRS in some libraries --- indra/llmath/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 indra/llmath/CMakeLists.txt (limited to 'indra/llmath') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt old mode 100644 new mode 100755 index a06dea2e9a..0614fd92ef --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -7,6 +7,7 @@ include(LLCommon) include_directories( ${LLCOMMON_INCLUDE_DIRS} + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} ) set(llmath_SOURCE_FILES -- cgit v1.2.3