Skip to content

Commit

Permalink
updating fast_float to v6.0.0 from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gangatp committed Dec 18, 2023
1 parent 2b44ccc commit bc97b59
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
32 changes: 32 additions & 0 deletions submodules/update_libs.bat
Original file line number Diff line number Diff line change
@@ -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"
)
)
34 changes: 34 additions & 0 deletions submodules/update_libs.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bc97b59

Please sign in to comment.