mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-23 16:42:35 +00:00
Fix up the loader unit tests so that if --with-gui is not passed to configure, the non-GUI tests will continute to run instead of failing compilation.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7550 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
d0acd44696
commit
820efdcc24
|
@ -39,13 +39,12 @@ GETTEXT_LDFLAGS = @GETTEXT_LDFLAGS@ @LIBINTL@
|
|||
# Build full linking line
|
||||
LDFLAGS = -lm $(GETTEXT_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(ICONV_LDFLAGS) $(CUNIT_LDFLAGS)
|
||||
|
||||
# Object files
|
||||
OBJS= \
|
||||
cu_list.o \
|
||||
cu_pgsql2shp.o \
|
||||
cu_tester.o
|
||||
|
||||
LOADER_OBJS= \
|
||||
../structure.o \
|
||||
../dbfopen.o \
|
||||
../shpopen.o \
|
||||
../getopt.o \
|
||||
|
@ -53,6 +52,18 @@ LOADER_OBJS= \
|
|||
../safileio.o \
|
||||
../pgsql2shp-core.o
|
||||
|
||||
# We test this variable later to see if we're building the GUI
|
||||
gtk_build = @GTK_BUILD@
|
||||
|
||||
# If we are, define a variable so we can conditionally perform regression
|
||||
# and also build an extra test file
|
||||
ifneq ($(gtk_build),)
|
||||
CFLAGS += -DGTK
|
||||
OBJS += cu_list.o
|
||||
LOADER_OBJS += ../structure.o
|
||||
endif
|
||||
|
||||
|
||||
# If we couldn't find the cunit library then display a helpful message
|
||||
ifeq ($(CUNIT_LDFLAGS),)
|
||||
all: requirements_not_met_cunit
|
||||
|
|
|
@ -27,12 +27,16 @@ int main()
|
|||
if (CUE_SUCCESS != CU_initialize_registry())
|
||||
return CU_get_error();
|
||||
|
||||
/* Add the algorithms suite to the registry */
|
||||
#ifdef GTK
|
||||
/* Add the GUI algorithms suite to the registry */
|
||||
if (NULL == register_list_suite())
|
||||
{
|
||||
CU_cleanup_registry();
|
||||
return CU_get_error();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Add the pgsql2shp test suite */
|
||||
if (NULL == register_pgsql2shp_suite())
|
||||
{
|
||||
CU_cleanup_registry();
|
||||
|
|
Loading…
Reference in a new issue