aboutsummaryrefslogtreecommitdiff
path: root/test/unit/CMakeLists.txt
AgeCommit message (Collapse)Author
2022-02-01Use external gtest by default when detectedEven Rouault
2021-10-23CMake: revise how we deal with symbol export and static buildsEven Rouault
- Remove the explicit PROJ_MSVC_DLL_IMPORT symbol used for importing symbols from a MSVC .dll: by default on MSVC, we use now __declspec(dllimport), unless PROJ_MSVC_DLL_EXPORT is defined by PROJ at build time. This makes it easier for users: they don't have to define anything special. This simplifies in particular the build of our binaries - For static builds, export -DPROJ_DLL= as public, so that users that import PROJ through CMake mechanism don't have to do it manually.
2021-09-07Fix database access across fork() when SQLite3 doesn't use pread[64]() ↵Even Rouault
(fixes #2843)
2021-07-14CMake: remove external nlohmann_json from INTERFACE_LINK_LIBRARIES targetMike Taves
2021-04-30CMake build: add a NLOHMANN_JSON_ORIGIN=auto/external/internal setting ↵Even Rouault
allowing to choose which nlohmann/json to use Co-authored-by: Mike Taves <mwtoews@gmail.com>
2021-03-17proj.h: add PROJ_COMPUTE_VERSION, PROJ_VERSION_NUMBER, PROJ_AT_LEAST_VERSION ↵Even Rouault
macros Makes it easier for users to test if they build against a PROJ version later than a given x.y.z version.
2021-02-14CMake: Prefer keyword signature of target_link_libraries commandMateusz Łoskot
Closes #2515
2020-12-12Split test_operation.cpp in two partsEven Rouault
2020-11-20Remove src/transform.cpp and related testsKristian Evers
2020-09-30Add a +proj=tinshift for triangulation-based transformationsEven Rouault
Implements RFC-6
2020-05-16Add a +proj=defmodel transformation for multi-component time-based ↵Even Rouault
deformation models Fixes #1001 Co-authored-by: Chris Crook <ccrook@linz.govt.nz>
2020-03-28CMake: prefer to use use PROJ_SOURCE_DIR and PROJ_BINARY_DIR (#2100)Mike Taves
* Use instead of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR * Also PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR, which are similar * Set properties with a list variable rather than a long line * Correction to 'proj_test_set_properties' function, rename ENVIRONMENT: - PROJ_IGNORE_USER_WRITABLE_DIRECTORY (ignored) - PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY (used by filemanager.cpp)
2020-02-22Merge pull request #1962 from mwtoews/sharedMike Taves
CMake: rename BUILD_LIBPROJ_SHARED to BUILD_SHARED_LIBS
2020-02-21Switch build configuration logic from DISABLE_TIFF to ENABLE_TIFFMike Taves
* Autotools interface should be the same, but different ./configure --help * For CMake, the option should be -DENABLE_TIFF=NO (default is YES) * Use TIFF_ENABLED and CURL_ENABLED variables, based on option and outcome * Reword some messages and add hints * Move -DTIFF_ENABLED and -DCURL_ENABLED from global add_definitions() to target_compile_definitions(), which is recommended practice * Minor spelling and style consistency around SQLITE_VERSION check
2020-02-21CMake: rename BUILD_LIBPROJ_SHARED to BUILD_SHARED_LIBSMike Taves
* Deprecate BUILD_LIBPROJ_SHARED, but still use it as an alias for now * Rename BUILD_LIBPROJ_SHARED_DEFAULT to BUILD_SHARED_LIBS_DEFAULT * Keep previous defaults (UNIX as shared and Windows as static) * Remove PROJ_LIBRARY_TYPE, since add_library() uses BUILD_SHARED_LIBS
2020-01-22Merge RFC4 (#1865)Even Rouault
This commit is the result of the squashing of rfc4_dev branch in a single commit. It implements mostly RFC 4 related work. * Grid handling: - remove obsolete and presumably unfinished implementation of grid catalog functionality - all grid functionality is in grids.cpp/.hpp - vertical and horizontal grid shift: rework to no longer load whole grid into memory - remove hgrids and vgrids member from PJ structure, and store them in hgridshift/vgridshift/deformation structures - build systems: add optional libtiff dependency. Must be explicitly disabled if not desired - add support for horizontal and vertical grids in GeoTIFF, if libtiff is available - add GenericShiftGridSet and GenericShiftGrid classes, relying on TIFF grids, that can be used for generic purpose grid-based adjustment - add a +proj=xyzgridshift method to perform geocentric translation by grid. Used for French NTF to RGF93 transformation using gr3df97a.tif grid - deformation: add support for +grids= for GeoTIFF grids - horizontal grid shift: fix failures on points slightly outside a subgrid (fixes #209) * File management: - add a filemanager.cpp/.hpp to deal with file related work - test for legacy proj_api.h fileapi - proj.h: add proj_context_set_fileapi() and proj_context_set_sqlite3_vfs_name() (fixes #866) - add capability to read resource files from the user writable directory * Network access: - build systems: add optional curl dependency - add a curl-based default implementation for network related functionality - proj.h: add C API to control network functionality, and optionaly provide network callbacks - add data/proj.ini with default settings - add a SQLite3 local cache of downloaded chunks - add proj_is_download_needed() and proj_download_file() * Use Win32 Unicode APIs and expect all strings to be UTF-8 (fixes #1765) For backward compatibility, if PROJ_LIB content is found to be not UTF-8 or pointing to a non existing directory, then an attempt at interpretating it in the ANSI page encoding is done. proj_context_set_search_paths() now assumes strings to be in UTF-8, and functions returning paths will also return values in UTF-8.
2019-09-19set PROJ_LIB on test targets for CMakeHoward Butler
2019-04-05CMake: cache C/C++ warn flags to compile PROJ targetsMike Taves
Remove (most) needs to fiddle with CMAKE_C_FLAGS / CMAKE_CXX_FLAGS
2019-03-25pj_strerrno: enable system error messagesChris Mayo
HAVE_STRERROR is defined in proj_config.h.
2019-03-19Normalize CMake with cmakelint, 2-space indentMike Taves
2019-02-14Mark the external GTest package as requiredKai Pastor
GTest provides a configuration file, so we can disable the module mode. If the GTest package cannot be found, this shall be reported right here. (Note that while we specify a version, we do not require an EXACT match.)
2019-02-14Link gtest library with GTest:: prefixKai Pastor
GTest::gtest is the imported target supplied by find_package(GTest). For the internal build of GTest, this target is created as an alias for now: find_package cannot be used because the interal build does not get installed, and so a package config file is not available.
2019-02-14Remove legacy cmake commandsKai Pastor
PROJ requires CMake >= 3.5.
2019-02-14Use GTest 1.8.1Kai Pastor
This fixes issues with MinGW when threads are used.
2019-02-04Allow building against external GTest with CMake.Elliott Sales de Andrade
2019-01-09proj.h: add proj_context_set_file_finder() and ↵Even Rouault
proj_context_set_search_paths() (refs #1150)
2019-01-04Replace PJ_IO_UNITS_WHATEVER with units from neighbour stepsKristian Evers
With this commit we make sure that proj_angular_input() and proj_angular_output return the correct result for any given pipeline.
2018-11-29Add unit test for pj_tranform() now that cs2cs no longer use itEven Rouault
2018-11-21Move 'builtins' test of src/gie.c to test/unit/gie_self_tests.cppEven Rouault
2018-11-14Implement RFC 2: Initial integration of "GDAL SRS barn" workEven Rouault
This work mostly consists of: - a C++ implementation of the ISO-19111:2018 / OGC Topic 2 "Referencing by coordinates" classes to represent Datums, Coordinate systems, CRSs (Coordinate Reference Systems) and Coordinate Operations. - methods to convert between this C++ modeling and WKT1, WKT2 and PROJ string representations of those objects - management and query of a SQLite3 database of CRS and Coordinate Operation definition - a C API binding part of those capabilities This is all-in-one squashed commit of the work of https://github.com/OSGeo/proj.4/pull/1040
2018-06-20Add test for proj_errno_string()Kristian Evers
2018-06-18Add pj_phi2_test (#1039 & #1045)Even Rouault
Nigrated from: schwehr/gdal-autotest2:cpp/third_party/proj/pj_phi2_test.cc@master License intentionally changed from Apache 2 to match PROJ.
2018-06-07Add CMake configuration for test/googletest and test/unitMateusz Loskot
For CMake builds, latest googletest 1.8.0 is downloaded. Following officially recommended integration for CMake-enabled projects https://github.com/google/googletest/blob/master/googletest/README.md "Use CMake to download GoogleTest as part of the build's configure step. This is just a little more complex, but doesn't have the limitations of the other methods." Since, our copy of test/googletest - is a very minimalist copy of googletest - does not include any official CMake scripts - would require copying parts of googletest CMakeLists.txt, compilater/linker flags (e.g. -lpthreads) for reliable multi-platform builds, it is reasoanable to rely on download All pros and cons advantages are discussed in teh README.md linked above. Closes #1033
2018-06-07Add googletest 1.8.0 framework in test/googletest, and use it with autoconf ↵Even Rouault
builds only (CMake integration to be done)
2018-06-04appveyor.yml: run ctest on cmake buildsEven Rouault
2018-05-30Move catch.hpp header in test/; rename test/cpp as test/unitEven Rouault