Skip to content

Commit

Permalink
Move catch.hpp header in test/; rename test/cpp as test/unit
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed May 30, 2018
1 parent a3c5928 commit 6fbfa8e
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 32 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ AC_SUBST(MUTEX_SETTING,$MUTEX_SETTING)
AC_SUBST(THREAD_LIB,$THREAD_LIB)

AC_CONFIG_FILES([Makefile cmake/Makefile src/Makefile
test/Makefile test/gie/Makefile test/gigs/Makefile test/cpp/Makefile
test/Makefile test/gie/Makefile test/gigs/Makefile test/unit/Makefile
man/Makefile man/man1/Makefile man/man3/Makefile nad/Makefile
jniwrap/Makefile jniwrap/org.osgeo.proj/Makefile jniwrap/org.osgeo.proj/org/Makefile jniwrap/org.osgeo.proj/org/proj4/Makefile])
AC_CONFIG_FILES([nad/install], [chmod +x nad/install])
Expand Down
11 changes: 10 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,13 @@ proj_add_gie_test("GIGS-5201" "gigs/5201.gie")
#proj_add_gie_test("GIGS-5207.2" "gigs/5207.2.gie")
proj_add_gie_test("GIGS-5208" "gigs/5208.gie")

add_subdirectory(cpp)
SET(CATCH2_INCLUDE catch.hpp)

SET(TEST_MAIN_SRC test_main.cpp)
set(TEST_MAIN_LIBRARIES test_main)
add_library( ${TEST_MAIN_LIBRARIES}
${PROJ_LIBRARY_TYPE}
${TEST_MAIN_SRC}
${CATCH2_INCLUDE} )

add_subdirectory(unit)
11 changes: 9 additions & 2 deletions test/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
SUBDIRS = gie gigs cpp

EXTRA_DIST = CMakeLists.txt

include_HEADERS = catch.hpp

lib_LTLIBRARIES = libtestmain.la

libtestmain_la_LDFLAGS = -no-undefined
libtestmain_la_SOURCES = test_main.cpp

SUBDIRS = . gie gigs unit
File renamed without changes.
20 changes: 0 additions & 20 deletions test/cpp/Makefile.am

This file was deleted.

File renamed without changes.
10 changes: 2 additions & 8 deletions test/cpp/CMakeLists.txt → test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
SET(CATCH2_INCLUDE catch.hpp)

SET(TEST_MAIN_SRC test_main.cpp)
set(TEST_MAIN_LIBRARIES test_main)
add_library( ${TEST_MAIN_LIBRARIES}
${PROJ_LIBRARY_TYPE}
${TEST_MAIN_SRC}
${CATCH2_INCLUDE} )
SET(CATCH2_INCLUDE ../catch.hpp)
include_directories(..)

SET(BASIC_TEST_SRC basic_test.cpp)
add_executable(basic_test ${BASIC_TEST_SRC} ${CATCH2_INCLUDE})
Expand Down
13 changes: 13 additions & 0 deletions test/unit/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
EXTRA_DIST = CMakeLists.txt

AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/test

bin_PROGRAMS = basic_test

basic_test_SOURCES = basic_test.cpp
basic_test_LDADD = ../../src/libproj.la ../../test/libtestmain.la

basic_test-check: basic_test
./basic_test

check-local: basic_test-check
File renamed without changes.

0 comments on commit 6fbfa8e

Please sign in to comment.