Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Unit tests: Improve build time #1141

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
# by the Free Software Foundation.
# See the COPYING file for more information.
################################################################################

file(GLOB_RECURSE _sources ${CMAKE_CURRENT_LIST_DIR}/*.cpp CONFIGURE_DEPEND)
set_source_files_properties(${_sources} PROPERTIES COMPILE_FLAGS -O1)
add_executable(test_geos_unit ${_sources})
unset(_sources)

Expand All @@ -20,6 +22,11 @@ target_include_directories(test_geos_unit
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>)

# Precompile TUT
#if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.16")
# target_precompile_headers(test_geos_unit PRIVATE "${CMAKE_CURRENT_LIST_DIR}/tut/tut.hpp")
#endif()

file(GLOB_RECURSE _testfiles ${CMAKE_CURRENT_LIST_DIR}/**/*Test.cpp CONFIGURE_DEPEND)
mwtoews marked this conversation as resolved.
Show resolved Hide resolved
foreach(_testfile ${_testfiles})
string(REPLACE ${CMAKE_CURRENT_LIST_DIR}/ "" _testname ${_testfile})
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/algorithm/AngleTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#include <geos/geom/Coordinate.h>
#include <geos/algorithm/Angle.h>
// std
#include <sstream>
#include <string>
#include <memory>

namespace tut {
//
Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/AreaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <geos/geom/PrecisionModel.h>
#include <geos/io/WKTReader.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/CGAlgorithms/OrientationIsCCWTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// std
#include <string>
#include <memory>
#include <cassert>
#include <sstream>

using namespace geos::algorithm;
Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/CGAlgorithms/signedAreaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <string>
#include <memory>
#include <cassert>
#include <sstream>

using namespace geos::algorithm;

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/CentroidTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <geos/geom/PrecisionModel.h>
#include <geos/io/WKTReader.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/ConvexHullTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
// std
#include <sstream>
#include <memory>
#include <cassert>

namespace geos {
namespace geom {
Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/InteriorPointAreaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <geos/io/WKTReader.h>
#include <geos/geom/Geometry.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
2 changes: 0 additions & 2 deletions tests/unit/algorithm/IntersectionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <geos/io/WKTReader.h>
#include <geos/geom/Geometry.h>
// std
#include <sstream>
#include <string>
#include <memory>

namespace tut {
Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/LengthTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <geos/geom/PrecisionModel.h>
#include <geos/io/WKTReader.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/LocatePointInRingTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <geos/geom/LineString.h>
#include <geos/geom/Coordinate.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/MinimumAreaRectangleTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <geos/geom/Geometry.h>
#include <utility.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/MinimumBoundingCircleTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <geos/io/WKTReader.h>

// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/MinimumDiameterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <geos/io/WKTWriter.h>
#include <geos/geom/Geometry.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
3 changes: 0 additions & 3 deletions tests/unit/algorithm/OrientationIndexFailureTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
#include <geos/geom/Coordinate.h>
#include <geos/algorithm/Orientation.h>
// std
#include <sstream>
#include <string>
#include <memory>

using namespace geos::geom;
using namespace geos::algorithm;
Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/PointLocationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <geos/algorithm/PointLocation.h>

// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/PointLocatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <geos/geom/Geometry.h> // required for use in unique_ptr
#include <geos/geom/Coordinate.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/PolygonNodeTopologyTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <geos/algorithm/PolygonNodeTopology.h>

// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/RobustLineIntersectionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <geos/geom/LineString.h>
#include <geos/geom/Coordinate.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
3 changes: 0 additions & 3 deletions tests/unit/algorithm/RobustLineIntersectorZTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
#include <geos/geom/Coordinate.h>
#include <geos/geom/LineSegment.h>
// std
#include <sstream>
#include <string>
#include <memory>
#include <utility>


Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/construct/LargestEmptyCircleTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <geos/io/WKTReader.h>
#include <geos/constants.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <geos/io/WKTWriter.h>
#include <geos/util.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <geos/util.h>
// std
#include <cmath>
#include <sstream>
#include <string>
#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <geos/geom/Coordinate.h>
// std
#include <cmath>
#include <sstream>
#include <string>
#include <memory>
#include <cfenv>
Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/hull/ConcaveHullOfPolygonsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <geos/constants.h>
#include <utility.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion tests/unit/algorithm/hull/ConcaveHullTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <geos/constants.h>
#include <utility.h>
// std
#include <sstream>
#include <string>
#include <memory>

Expand Down
2 changes: 0 additions & 2 deletions tests/unit/algorithm/locate/IndexedPointInAreaLocatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include <geos/algorithm/locate/IndexedPointInAreaLocator.h>

// std
#include <sstream>
#include <string>
#include <memory>

using geos::geom::CoordinateXY;
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/capi/GEOSBufferTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>

#include "capi_test_utils.h"

Expand Down
4 changes: 0 additions & 4 deletions tests/unit/capi/GEOSBuildAreaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cmath>

#include "capi_test_utils.h"

Expand Down
4 changes: 0 additions & 4 deletions tests/unit/capi/GEOSCAPIDefinesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>

#define QUOTE(x) #x
#define EXPAND_AND_QUOTE(y) QUOTE(y)
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/capi/GEOSClipByRectTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <memory>

#include "capi_test_utils.h"

Expand Down
3 changes: 0 additions & 3 deletions tests/unit/capi/GEOSConcaveHullOfPolygonsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>

#include "capi_test_utils.h"

Expand Down
3 changes: 0 additions & 3 deletions tests/unit/capi/GEOSConcaveHullTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>

#include "capi_test_utils.h"

Expand Down
4 changes: 0 additions & 4 deletions tests/unit/capi/GEOSConstrainedDelaunayTriangulationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <memory>

#include "capi_test_utils.h"

Expand Down
3 changes: 0 additions & 3 deletions tests/unit/capi/GEOSContainsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
#include <geos/geom/PrecisionModel.h>
#include <geos/geom/GeometryFactory.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>

#include "capi_test_utils.h"

Expand Down
3 changes: 0 additions & 3 deletions tests/unit/capi/GEOSConvexHullTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>

#include "capi_test_utils.h"

Expand Down
3 changes: 1 addition & 2 deletions tests/unit/capi/GEOSCoordSeqTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <memory>

#include "capi_test_utils.h"

Expand Down
5 changes: 0 additions & 5 deletions tests/unit/capi/GEOSCoverageIsValidTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#include <tut/tut.hpp>
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>

#include "capi_test_utils.h"

Expand Down
5 changes: 0 additions & 5 deletions tests/unit/capi/GEOSCoverageSimplifyTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#include <tut/tut.hpp>
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>

#include "capi_test_utils.h"

Expand Down
5 changes: 0 additions & 5 deletions tests/unit/capi/GEOSCoverageUnionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#include <tut/tut.hpp>
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>

#include "capi_test_utils.h"

Expand Down
5 changes: 0 additions & 5 deletions tests/unit/capi/GEOSDelaunayTriangulationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#include <tut/tut.hpp>
// geos
#include <geos_c.h>
// std
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <memory>

#include "capi_test_utils.h"

Expand Down
Loading
Loading