summaryrefslogtreecommitdiffstats
path: root/Tests/FindLAPACK/Test/main.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-28 11:18:07 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-28 11:18:41 (GMT)
commit73f81c5070e7880efe5acfc1827f60524116cee1 (patch)
treead84a9314fee3ce9917ae988eec1aef285a2d833 /Tests/FindLAPACK/Test/main.c
parent4a0fbba1f28bccf9a072adc680325d8dba3b2a85 (diff)
parent4ed936d1b8af6afc7dd88f3d6cad5c36e12f91aa (diff)
downloadCMake-73f81c5070e7880efe5acfc1827f60524116cee1.zip
CMake-73f81c5070e7880efe5acfc1827f60524116cee1.tar.gz
CMake-73f81c5070e7880efe5acfc1827f60524116cee1.tar.bz2
Merge topic 'FindLAPACK-target'
4ed936d1b8 FindLAPACK: Provide the LAPACK::LAPACK import target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4677
Diffstat (limited to 'Tests/FindLAPACK/Test/main.c')
-rw-r--r--Tests/FindLAPACK/Test/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/FindLAPACK/Test/main.c b/Tests/FindLAPACK/Test/main.c
new file mode 100644
index 0000000..5873e7b
--- /dev/null
+++ b/Tests/FindLAPACK/Test/main.c
@@ -0,0 +1,20 @@
+#include <assert.h>
+#include <string.h>
+
+// declare what parts of the lapack C-API we need
+void dgesv_(int*, int*, double*, int*, int*, double*, int*, int*);
+
+int main()
+{
+ double A[8] = {
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ };
+ double B[2] = { 0, 5 };
+ int ipiv[2] = { 0, 0 };
+ int info = 0;
+
+ int dim = 2;
+ int numCols = 1;
+ dgesv_(&dim, &numCols, A, &dim, ipiv, B, &dim, &info);
+ return 0;
+}