Disable LAPACK for iOS builds.
Apple annoyingly claims that dsyrk_ is a private API, and rejects
submissions to the Apple Store that include this symbol.
Also change ifdef -> ifndef in blas.cc
Change-Id: I432e9519cfe661fc96a58f36a86389a916b6a8b6
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39551ee..3aae07a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,7 +184,11 @@
UPDATE_CACHE_VARIABLE(GFLAGS OFF)
UPDATE_CACHE_VARIABLE(OPENMP OFF)
- MESSAGE(STATUS "Building for iOS: SuiteSparse, CXSparse, gflags and OpenMP are not available.")
+ # Apple claims that the BLAS call dsyrk_ is a private API, and will not allow you
+ # to submit to the Apple Store if the symbol is present.
+ UPDATE_CACHE_VARIABLE(LAPACK OFF)
+
+ MESSAGE(STATUS "Building for iOS: SuiteSparse, CXSparse, LAPACK, gflags, and OpenMP are not available.")
UPDATE_CACHE_VARIABLE(BUILD_EXAMPLES OFF)
MESSAGE(STATUS "Building for iOS, will not build examples.")
diff --git a/internal/ceres/blas.cc b/internal/ceres/blas.cc
index da49183..7d611b2 100644
--- a/internal/ceres/blas.cc
+++ b/internal/ceres/blas.cc
@@ -32,7 +32,7 @@
#include "ceres/internal/port.h"
#include "glog/logging.h"
-#ifdef CERES_NO_LAPACK
+#ifndef CERES_NO_LAPACK
extern "C" void dsyrk_(char* uplo,
char* trans,
int* n,