summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/FindGDAL/Test/CMakeLists.txt4
-rw-r--r--Tests/FindGDAL/Test/main.c5
2 files changed, 3 insertions, 6 deletions
diff --git a/Tests/FindGDAL/Test/CMakeLists.txt b/Tests/FindGDAL/Test/CMakeLists.txt
index 20f4b84..8bdc57c 100644
--- a/Tests/FindGDAL/Test/CMakeLists.txt
+++ b/Tests/FindGDAL/Test/CMakeLists.txt
@@ -4,9 +4,7 @@ include(CTest)
find_package(GDAL REQUIRED)
-# FindGDAL doesn't export a version number.
-#add_definitions(-DCMAKE_EXPECTED_GDAL_VERSION="${GDAL_VERSION}")
-add_definitions(-DCMAKE_EXPECTED_GDAL_VERSION="unknown")
+add_definitions(-DCMAKE_EXPECTED_GDAL_VERSION="${GDAL_VERSION}")
add_executable(test_tgt main.c)
target_link_libraries(test_tgt GDAL::GDAL)
diff --git a/Tests/FindGDAL/Test/main.c b/Tests/FindGDAL/Test/main.c
index 046eb99..7b31a13 100644
--- a/Tests/FindGDAL/Test/main.c
+++ b/Tests/FindGDAL/Test/main.c
@@ -1,12 +1,11 @@
#include <gdal.h>
#include <stdio.h>
-// #include <string.h>
+#include <string.h>
int main()
{
printf("Found GDAL version %s, expected version %s\n", GDAL_RELEASE_NAME,
CMAKE_EXPECTED_GDAL_VERSION);
GDALAllRegister();
- // return strcmp(GDAL_RELEASE_NAME, CMAKE_EXPECTED_GDAL_VERSION);
- return 0;
+ return strcmp(GDAL_RELEASE_NAME, CMAKE_EXPECTED_GDAL_VERSION);
}