mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpimath] Workaround intellisense Eigen issue (#4992)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
30
upstream_utils/eigen_patches/0002-Intellisense-fix.patch
Normal file
30
upstream_utils/eigen_patches/0002-Intellisense-fix.patch
Normal 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__)
|
||||
@@ -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
|
||||
|
||||
@@ -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__)
|
||||
|
||||
Reference in New Issue
Block a user