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