| Date: Thu, 5 Aug 2021 16:07:32 +0000 |
| From: 6c13054fae84e233b3eb55bf5311ada67ca91cfc Mon Sep 17 00:00:00 2001 |
| Subject: [PATCH] Support negative numbers with write_config |
| Source: COMCAST |
| Upstream-Status: Pending |
| Signed-off-by: Eugene Mutavchi <Ievgen_Mutavchi@comcast.com> |
| |
| --- |
| cmake/config/formats/json/json_indented.cmake | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/cmake/config/formats/json/json_indented.cmake b/cmake/config/formats/json/json_indented.cmake |
| index 776019d5..4392e63f 100644 |
| --- a/cmake/config/formats/json/json_indented.cmake |
| +++ b/cmake/config/formats/json/json_indented.cmake |
| @@ -75,7 +75,7 @@ function(json_indented) |
| if (NOT "${node}" STREQUAL "___array___") |
| if(NOT content_length) |
| map_append_string(${context} json "null") |
| - elseif("_${node}" MATCHES "^_(0|(([1-9][0-9]*)([.][0-9]+([eE][+-]?[0-9]+)?)?)|(true)|(false))$") |
| + elseif("_${node}" MATCHES "^_(0|(([-]?[1-9][0-9]*)([.][0-9]+([eE][+-]?[0-9]+)?)?)|(true)|(false))$") |
| map_append_string(${context} json "${node}") |
| else() |
| cmake_string_to_json("${node}") |
| -- |
| 2.25.1 |
| |