From bc97b5913cf7f7eef554f4fdf445665f83dbb68f Mon Sep 17 00:00:00 2001 From: gangatp Date: Mon, 18 Dec 2023 16:22:47 +0530 Subject: [PATCH] updating fast_float to v6.0.0 from develop --- submodules/fast_float | 2 +- submodules/update_libs.bat | 32 ++++++++++++++++++++++++++++++++ submodules/update_libs.sh | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 submodules/update_libs.bat create mode 100644 submodules/update_libs.sh diff --git a/submodules/fast_float b/submodules/fast_float index 1dfad243e..f3ff46fd4 160000 --- a/submodules/fast_float +++ b/submodules/fast_float @@ -1 +1 @@ -Subproject commit 1dfad243ec42a0459a786a621be0b1f8c8a8287e +Subproject commit f3ff46fd40d28b5eb272727812e5bd8dc5a6d876 diff --git a/submodules/update_libs.bat b/submodules/update_libs.bat new file mode 100644 index 000000000..0ac145703 --- /dev/null +++ b/submodules/update_libs.bat @@ -0,0 +1,32 @@ +@echo off +setlocal EnableDelayedExpansion + +set base_path=%~dp0 +cd %base_path% + +if not exist "..\Libraries\" (mkdir "..\Libraries") + +set update_lib=%~1 + +for %%A in ("fast_float" "") do ( + if "%update_lib%"==%%A ( + REM updating the fast_float library + set lib_name="fast_float" + set lib_path_src="!base_path!!lib_name!\" + + cd !lib_name! + set "tag=" + for /f %%i in ('git describe --contains HEAD') do set "tag=%%i" + + cd !base_path! + REM delete the destination library folder when updating + RD /S /Q "..\Libraries\!lib_name!" + set lib_path_dest="..\Libraries\!lib_name!\" + mkdir !lib_path_dest! + + mkdir "!lib_path_dest!Include" + copy !lib_path_src!include\!lib_name!\*.h "!lib_path_dest!Include" /Y + + echo "!tag!" >"!lib_path_dest!!lib_name!_!tag!.txt" + ) +) diff --git a/submodules/update_libs.sh b/submodules/update_libs.sh new file mode 100644 index 000000000..0a3b619a5 --- /dev/null +++ b/submodules/update_libs.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +base_path=$(dirname $(realpath -s $0))"/" +cd "$base_path" + +if [ ! -d "../Libraries/" ]; then + mkdir "../Libraries" +fi + +update_all_libs=false + +if [ -z "$1" ]; then + update_all_libs=true +fi + +# Updating the fast_float library +if [[ "$1" == "fast_float" || "$update_all_libs" == true ]]; then + lib_name="fast_float" + lib_path_src="$base_path$lib_name/" + + cd "$lib_name" + tag=$(git describe --contains HEAD) + cd "$base_path" + + # Delete the destination library folder when updating + lib_path_dest="../Libraries/$lib_name/" + rm -rf "$lib_path_dest" + mkdir -p "$lib_path_dest" + + mkdir "$lib_path_dest/Include" + cp ${lib_path_src}include/$lib_name/*.h "${lib_path_dest}Include" + + echo "\"$tag\"" > "$lib_path_dest${lib_name}_$tag.txt" +fi