aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/suitesparse-cxsparse/001-detect-complex-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/suitesparse-cxsparse/001-detect-complex-support.patch')
-rw-r--r--vcpkg/ports/suitesparse-cxsparse/001-detect-complex-support.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/vcpkg/ports/suitesparse-cxsparse/001-detect-complex-support.patch b/vcpkg/ports/suitesparse-cxsparse/001-detect-complex-support.patch
new file mode 100644
index 0000000..01279b7
--- /dev/null
+++ b/vcpkg/ports/suitesparse-cxsparse/001-detect-complex-support.patch
@@ -0,0 +1,14 @@
+Android API level 22 and earlier don't provide any complex-valued math functions in complex.h,
+which are required for complex data type support in CXSparse.
+
+--- a/CXSparse/CMakeLists.txt
++++ b/CXSparse/CMakeLists.txt
+@@ -45,7 +45,7 @@
+ # MS Visual Studio does not support the complex type for ANSI C11.
+ # FIXME: see GraphBLAS for how to use complex types in MS Visual Studio.
+
+-if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") )
++if ( MSVC OR CMAKE_C_SIMULATE_ID STREQUAL "MSVC" OR (CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_VERSION VERSION_LESS 23) )
+ option ( CXSPARSE_USE_COMPLEX "ON: complex data type enabled. OFF (default): complex data type disabled." OFF )
+ else ( )
+ option ( CXSPARSE_USE_COMPLEX "ON (default): complex data type enabled. OFF: complex data type disabled." ON )