From 89d75e45cb43b641b78a1d8dbbad209171d8c9c1 Mon Sep 17 00:00:00 2001 From: Daniel Scharrer Date: Mon, 25 May 2020 22:34:45 +0200 Subject: [PATCH] CMake: Check that README.md is up to date --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7828ca3..dbb64f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -523,3 +523,12 @@ print_configuration("Charset conversion" 1 "builtin" ) message("") + +if(DEVELOPER) + file(READ "README.md" readme) + parse_version_file("VERSION" "VERSION") + string(REPLACE "${VERSION_2}" "" readme_without_version "${readme}") + if(readme_without_version STREQUAL readme) + message(WARNING "Could not find '${VERSION_2}' in README.md.") + endif() +endif()