GDAL

ogr_libs.h
1/******************************************************************************
2 *
3 * Project: OpenGIS Simple Features Reference Implementation
4 * Purpose: Definitions related to support for use of SFCGAL and GEOS in OGR.
5 * This file is only intended to be pulled in by OGR implementation
6 * code directly accessing SFCGAL and/or GEOS.
7 * Author: Avyav Kumar Singh <avyavkumar at gmail dot com>
8 *
9 ******************************************************************************
10 * Copyright (c) 2016, Avyav Kumar Singh <avyavkumar at gmail dot com>
11 *
12 * SPDX-License-Identifier: MIT
13 ****************************************************************************/
14
15#ifndef HAVE_GEOS
16#define UNUSED_IF_NO_GEOS CPL_UNUSED
17#else
18#define UNUSED_IF_NO_GEOS
19#endif
20
21#ifndef HAVE_SFCGAL
22#define UNUSED_IF_NO_SFCGAL CPL_UNUSED
23#else
24#define UNUSED_IF_NO_SFCGAL
25#endif
26
27#ifndef UNUSED_PARAMETER
28
29#ifdef HAVE_GEOS
30#ifndef HAVE_SFCGAL
31#define UNUSED_PARAMETER \
32 UNUSED_IF_NO_SFCGAL // SFCGAL no and GEOS yes - GEOS methods always work
33#else
34#define UNUSED_PARAMETER // Both libraries are present
35#endif
36#endif
37
38#ifndef HAVE_GEOS
39#ifdef HAVE_SFCGAL
40#define UNUSED_PARAMETER \
41 UNUSED_IF_NO_GEOS // SFCGAL yes and GEOS no - SFCGAL methods always work
42#else
43#define UNUSED_PARAMETER \
44 CPL_UNUSED // Neither of the libraries have support enabled
45#endif
46#endif
47
48#endif