aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/unit/Makefile.am3
-rw-r--r--test/unit/include_proj_h_from_c.c35
2 files changed, 38 insertions, 0 deletions
diff --git a/test/unit/Makefile.am b/test/unit/Makefile.am
index 236ad444..f26e355d 100644
--- a/test/unit/Makefile.am
+++ b/test/unit/Makefile.am
@@ -14,6 +14,7 @@ noinst_PROGRAMS += pj_phi2_test
noinst_PROGRAMS += proj_errno_string_test
noinst_PROGRAMS += test_cpp_api
noinst_PROGRAMS += gie_self_tests
+noinst_PROGRAMS += include_proj_h_from_c
pj_transform_test_SOURCES = pj_transform_test.cpp main.cpp
pj_transform_test_LDADD = ../../src/libproj.la ../../test/googletest/libgtest.la
@@ -45,4 +46,6 @@ gie_self_tests_LDADD = ../../src/libproj.la ../../test/googletest/libgtest.la @S
gie_self_tests-check: gie_self_tests
PROJ_LIB=$(PROJ_LIB) ./gie_self_tests
+include_proj_h_from_c_SOURCES = include_proj_h_from_c.c
+
check-local: pj_transform_test-check pj_phi2_test-check proj_errno_string_test-check test_cpp_api-check gie_self_tests-check
diff --git a/test/unit/include_proj_h_from_c.c b/test/unit/include_proj_h_from_c.c
new file mode 100644
index 00000000..b98bdfb7
--- /dev/null
+++ b/test/unit/include_proj_h_from_c.c
@@ -0,0 +1,35 @@
+/******************************************************************************
+ *
+ * Project: PROJ
+ * Purpose: Dummy test to check that we can include proj.h from a pure C file
+ * Author: Even Rouault
+ *
+ ******************************************************************************
+ * Copyright (c) 2018, Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#include "proj.h"
+#include "proj_experimental.h"
+
+int main()
+{
+ return 0;
+}