From 7653cd081d0840a2917c8269dc2ad4546352f408 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 16 Jan 2020 16:11:03 +0100 Subject: [PATCH 1/2] Fix cgal_create_release_with_cmake.cmake --- .../developer_scripts/cgal_create_release_with_cmake.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake index 66385cbc1a6..49326012e21 100644 --- a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake +++ b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake @@ -78,7 +78,7 @@ if (NOT EXISTS ${GIT_REPO}/Installation/include/CGAL/version.h) endif() file(READ "${GIT_REPO}/Installation/include/CGAL/version.h" version_file_content) -string(REGEX MATCH "define CGAL_VERSION (.*)\n#define CGAL_VERSION_NR" CGAL_VERSION_FOUND "${version_file_content}") +string(REGEX MATCH "define CGAL_VERSION ([^\n]*)\n" CGAL_VERSION_FOUND "${version_file_content}") if (CGAL_VERSION_FOUND) set(CGAL_VERSION_INPUT "${CMAKE_MATCH_1}") @@ -166,11 +166,11 @@ if(EXISTS ${GIT_REPO}/.git) RESULT_VARIABLE RESULT_VAR OUTPUT_VARIABLE OUT_VAR ) - string(REPLACE "CGAL_GIT_HASH abcdef\n" "CGAL_GIT_HASH ${OUT_VAR}" file_content "${file_content}") + string(REGEX REPLACE "CGAL_GIT_HASH [^\n]*\n" "CGAL_GIT_HASH ${OUT_VAR}" file_content "${file_content}") endif() # update CGAL_RELEASE_DATE string(TIMESTAMP TODAY "%Y%m%d") -string(REPLACE "CGAL_RELEASE_DATE 20170101" "CGAL_RELEASE_DATE ${TODAY}" file_content "${file_content}") +string(REGEX REPLACE "CGAL_RELEASE_DATE [^\n]*" "CGAL_RELEASE_DATE ${TODAY}" file_content "${file_content}") # update CGAL_VERSION string(REPLACE "CGAL_VERSION ${CGAL_VERSION_INPUT}" "CGAL_VERSION ${CGAL_VERSION}" file_content "${file_content}") # update CGAL_VERSION_NR From 17a58a5625178b11e65aa96b6c0cfea3450ac2e6 Mon Sep 17 00:00:00 2001 From: Michel Zou Date: Wed, 27 Nov 2019 22:04:08 +0100 Subject: [PATCH 2/2] version.h: workaround for SWIG parsing --- Installation/include/CGAL/version.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index 23ed764b2bb..12ba874ea86 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -25,10 +25,12 @@ #ifndef CGAL_VERSION_H #define CGAL_VERSION_H +#ifndef SWIG #define CGAL_VERSION 4.14.3 +#define CGAL_GIT_HASH abcdef +#endif #define CGAL_VERSION_NR 1041431000 #define CGAL_SVN_REVISION 99999 -#define CGAL_GIT_HASH abcdef #define CGAL_RELEASE_DATE 20190329 #include