From 3ff24821df766aa3f9a24cc57168dbf4b7516183 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Tue, 25 Jul 2023 00:59:05 +0800
Subject: [PATCH 2/2] Fix gtest_rn for 32-bit platforms

---
 test/rn/CMakeLists.txt | 4 ++++
 test/rn/gtest_rn.cpp   | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git test/rn/CMakeLists.txt test/rn/CMakeLists.txt
index 11c7592..bbeeb65 100644
--- test/rn/CMakeLists.txt
+++ test/rn/CMakeLists.txt
@@ -1,5 +1,9 @@
 # SO3 tests
 
+if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+  add_definitions(-DMANIF_ARCH_32)
+endif()
+
 manif_add_gtest(gtest_rn gtest_rn.cpp)
 
 set(CXX_14_TEST_TARGETS
diff --git test/rn/gtest_rn.cpp test/rn/gtest_rn.cpp
index 4618130..61c4abc 100644
--- test/rn/gtest_rn.cpp
+++ test/rn/gtest_rn.cpp
@@ -14,7 +14,7 @@ using namespace manif;
 // especially, SO3 wasn't an issue despite being Eigen::Vector4d too...
 EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(R4d)
 
-#ifdef MANIF_COVERAGE_ENABLED
+#if defined(MANIF_COVERAGE_ENABLED) || defined(MANIF_ARCH_32)
 
 MANIF_TEST(R4d);
 MANIF_TEST_JACOBIANS(R4d);
@@ -109,6 +109,7 @@ TEST(TEST_RN, TEST_RN_VEC_ASSIGN_OP)
 }
 
 // This is a little too heavy for coverage and not relevant...
+// The same applies to 32-bit platforms.
 
 MANIF_TEST(R1f);
 MANIF_TEST(R2f);
