aboutsummaryrefslogtreecommitdiff
path: root/src/check_md5sum.cmake
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-10-11 00:36:22 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-10-11 11:47:34 +0200
commitb68ee957234387f8a5bb0e0a4eac88fc4cf5ed47 (patch)
treef5d920a9e6a1b2b35ae90cc9fc1c1d2e1a4bb85c /src/check_md5sum.cmake
parent7f0b6bd9c6978ac7639bcaf0de452cb29318e683 (diff)
downloadPROJ-b68ee957234387f8a5bb0e0a4eac88fc4cf5ed47.tar.gz
PROJ-b68ee957234387f8a5bb0e0a4eac88fc4cf5ed47.zip
CMake build: add generate_wkt1_parser and generate_wkt2_parser manual target, and logic to detect when they must be run
Diffstat (limited to 'src/check_md5sum.cmake')
-rw-r--r--src/check_md5sum.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/check_md5sum.cmake b/src/check_md5sum.cmake
new file mode 100644
index 00000000..bab6fc6f
--- /dev/null
+++ b/src/check_md5sum.cmake
@@ -0,0 +1,7 @@
+file(READ "${IN_FILE}" CONTENTS)
+
+string(MD5 MD5SUM "${CONTENTS}")
+
+if(NOT("${MD5SUM}" STREQUAL "${EXPECTED_MD5SUM}"))
+ message(FATAL_ERROR "File ${IN_FILE} has been modified. target ${TARGET} should be manually run. And lib_proj.cmake should be updated with \"${MD5SUM}\"")
+endif()