[wpimath] Workaround intellisense Eigen issue (#4992)

Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
Peter Johnson
2023-01-21 15:16:12 -08:00
committed by GitHub
parent b2b25bf09f
commit 504fa22143
3 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
From 94882f4460897f92dfe9f95ec33629094f8e76a2 Mon Sep 17 00:00:00 2001
From: Peter Johnson <johnson.peter@gmail.com>
Date: Fri, 20 Jan 2023 23:41:56 -0800
Subject: [PATCH 2/2] Intellisense fix
---
Eigen/src/Core/util/Macros.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index 986c3d4..81986b9 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -58,6 +58,16 @@
// Compiler identification, EIGEN_COMP_*
//------------------------------------------------------------------------------------------
+/// \internal Disable NEON features in Intellisense
+#if __INTELLISENSE__
+#ifdef __ARM_NEON
+#undef __ARM_NEON
+#endif
+#ifdef __ARM_NEON__
+#undef __ARM_NEON__
+#endif
+#endif
+
/// \internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC
#ifdef __GNUC__
#define EIGEN_COMP_GNUC (__GNUC__*10+__GNUC_MINOR__)

View File

@@ -105,7 +105,7 @@ def main():
# Apply patches to upstream Git repo
os.chdir(upstream_root)
for f in ["0001-Disable-warnings.patch"]:
for f in ["0001-Disable-warnings.patch", "0002-Intellisense-fix.patch"]:
git_am(os.path.join(wpilib_root, "upstream_utils/eigen_patches", f))
# Delete old install

View File

@@ -58,6 +58,16 @@
// Compiler identification, EIGEN_COMP_*
//------------------------------------------------------------------------------------------
/// \internal Disable NEON features in Intellisense
#if __INTELLISENSE__
#ifdef __ARM_NEON
#undef __ARM_NEON
#endif
#ifdef __ARM_NEON__
#undef __ARM_NEON__
#endif
#endif
/// \internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC
#ifdef __GNUC__
#define EIGEN_COMP_GNUC (__GNUC__*10+__GNUC_MINOR__)