mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 03:27:02 -07:00
Major refactor and API changes
- Updated `.gitignore` file - Updated `CMakeLists.txt` to build static exectuable - Changed some `Doxyfile` configurations to build more robust and complete documentation (WIP) - Changed how `remote` works to better reflect `git`'s API (WIP) - Changed how error handling works - Improved `bin/compile.sh` script - Improved `bin/lines.sh` script (kinda) - Removed some instances of `fmt` in favor of `std` string functions - Restructed style for better readibility
This commit is contained in:
parent
ba23299777
commit
5a73651ad1
29 changed files with 1836 additions and 1140 deletions
|
|
@ -1,11 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
exe=gdpm
|
||||
static=gdpm.static
|
||||
tests=gdpm.tests
|
||||
|
||||
function test_link(){
|
||||
path=$1
|
||||
link=$2
|
||||
if test -f "$path"
|
||||
then
|
||||
echo "Creating link from '$path' to '$link')"
|
||||
if test -f "$link"
|
||||
then
|
||||
rm $link
|
||||
fi
|
||||
ln -s $path $link
|
||||
fi
|
||||
}
|
||||
|
||||
function test_strip(){
|
||||
path=$1
|
||||
if test -f "$path"
|
||||
then
|
||||
echo "Stripping debug symbols from '$path'"
|
||||
strip "$path"
|
||||
fi
|
||||
}
|
||||
|
||||
# Run this script at project root
|
||||
#meson configure build
|
||||
#CXX=clang++ meson compile -C build -j$(proc)
|
||||
|
||||
|
||||
|
||||
# CMake/ninja build system
|
||||
mkdir -p build
|
||||
cmake -B build -S . -D CMAKE_EXPORT_COMPILE_COMMANDS=1 -D CMAKE_BUILD_TYPE=Debug -G Ninja
|
||||
|
|
@ -13,12 +40,17 @@ ninja -C build -j $(nproc)
|
|||
|
||||
|
||||
# Create symlinks to executables in build folder if necessary
|
||||
if test -f "../build/gdpm"; then
|
||||
rm bin/gdpm
|
||||
ln -s ../build/gdpm bin/gdpm
|
||||
fi
|
||||
test_link $script_dir/../build/gdpm $script_dir/../bin/$exe
|
||||
test_link $script_dir/../build/gdpm.static $script_dir/../bin/$static
|
||||
test_link $script_dir/../build/gdpm.tests $script_dir/../bin/$tests
|
||||
|
||||
if test -f "../build/gdpm-tests"; then
|
||||
rm bin/gdpm-tests
|
||||
ln -s ../build/gdpm-tests bin/gdpm-tests
|
||||
fi
|
||||
|
||||
# Strip debug symbols
|
||||
test_strip ${script_dir}/../build/gdpm
|
||||
test_strip ${script_dir}/../build/gdpm.static
|
||||
test_strip ${script_dir}/../build/gdpm.tests
|
||||
|
||||
|
||||
# Generate documentation using `doxygen`
|
||||
cd ${script_dir}/..
|
||||
doxygen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue