Skip to content

Commit

Permalink
Merge branch 'prepare_release'
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahnic committed Mar 30, 2023
2 parents 139d296 + e1aab25 commit c9b9dea
Show file tree
Hide file tree
Showing 10 changed files with 190 additions and 12 deletions.
35 changes: 23 additions & 12 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@

# Changelog

## [0.3.2]

### Added

- It is possible to collect parameters that will be forwarded to a subprocess. The syntax is
similar to the one used in GCC.
- Multiple names can be defined for meta-varaiables in `metavar()` by specifying a list of strings
instead of a simple string.
- Added the method `add` as an alias for `add_parameter`.
- The method `absent` is now an alias for `default_value`.
- Added shell tests for various library usage scenarios.

### Changed

- Some targets are available only when the Argumentum project is top-level.

### Fixed

- The header-only version can be installed.
- The library can be used from a Git submodule using modern CMake.


## [0.3.0]

### Added
Expand All @@ -18,17 +40,6 @@
parameters are deprecated and will be removed.
- Fix: Treat negative numbers as numbers when they can not be mistaken for options.

## [Next]

### Added
## [Next]

- It is possible to collect parameters that will be forwarded to a subprocess. The syntax is
similar to the one used in GCC.
- Multiple names can be defined for meta-varaiables in `metavar()` by specifying a list of strings
instead of a simple string.
- Added the method `add` as an alias for `add_parameter`.
- The method `absent` is now an alias for `default_value`.
- Some targets are available only when the Argumentum project is top-level.
- The library can be used from a Git submodule using modern CMake.
- The header-only version can be installed.
- Added shell tests for various library usage scenarios.
2 changes: 2 additions & 0 deletions test/consume/test-fetchcontent-headeronly.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# Download the library with CMake FetchContent and use it as a header-only library.

here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
Expand Down
2 changes: 2 additions & 0 deletions test/consume/test-fetchcontent-static.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# Download the library with CMake FetchContent and use it as a static library.
#
here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
Expand Down
2 changes: 2 additions & 0 deletions test/consume/test-submodule-headeronly.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# Download the library as a Git submodule and use it as a header-only library.

here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
Expand Down
2 changes: 2 additions & 0 deletions test/consume/test-submodule-static.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# Download the library as a Git submodule and use it as a static library.

here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
Expand Down
2 changes: 2 additions & 0 deletions test/consume/test-toplevel-publish-headeronly.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# Configure, build and install the library then use it as a header-only library with find-package.

here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
Expand Down
2 changes: 2 additions & 0 deletions test/consume/test-toplevel-publish.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# Configure, build and install the library then use it as a static library with find-package.

here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
Expand Down
2 changes: 2 additions & 0 deletions test/consume/test-toplevel-static.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# Build the static version of the library.

here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
Expand Down
77 changes: 77 additions & 0 deletions test/consume/vcpkg_headeronly.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/env bash

# Install the library through VCPKG then use it as a header-only library with find-package.

if [ "$1" == "-u" ]; then
# Use a special repo and branch for testing before publishing on VCPKG.
mode=update
echo "Mode: Test before publishing to vcpkg."
fi

here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
argumentumgit="file://$(realpath ../../../argumentum)"
builddir=out/build

if [ -d $workdir ]; then
rm -rf $workdir
fi

if [ ! -d $workdir ]; then
mkdir -p $workdir
fi

create_test_dir() {
local testdir=$workdir/basic
mkdir $testdir
cd $here
cp CMakeLists-installed.txt.in $testdir/CMakeLists.txt
mkdir -p $testdir/src
cp -r src-headeronly/* $testdir/src/

cd $testdir
mkdir -p $builddir
}

vcpkg_install_argumentum() {
cd $workdir
if [ "$mode" == "update" ]; then
# Use this repo and branch when preparing a new release.
git clone -b update_argumentum --single-branch https://github.com/mmahnic/vcpkg.git
else
git clone https://github.com/microsoft/vcpkg.git
fi

cd $workdir/vcpkg

if [ "$OSTYPE" == "linux-gnu" ]; then
bash bootstrap-vcpkg.sh
./vcpkg install argumentum
elif [ "$OSTYPE" == "msys" ]; then
cmd.exe /c bootstrap-vcpkg.bat
./vcpkg.exe install argumentum
export VCPKG_DEFAULT_TRIPLET=x64-windows
fi
}

configure() {
cd $workdir/basic
# local debug=--debug-output
cmake -S . -B $builddir $debug -DCMAKE_TOOLCHAIN_FILE=$workdir/vcpkg/scripts/buildsystems/vcpkg.cmake
}

build() {
cd $workdir/basic
# local debug=--debug-output
cmake --build $builddir $debug
}

export CMAKE_TOOLCHAIN_FILE=$workdir/vcpkg/scripts/buildsystems/vcpkg.cmake

create_test_dir
vcpkg_install_argumentum

configure
build

76 changes: 76 additions & 0 deletions test/consume/vcpkg_static.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/usr/bin/env bash

# Install the library through VCPKG then use it as a static library with find-package.

if [ "$1" == "-u" ]; then
# Use a special repo and branch for testing before publishing on VCPKG.
mode=update
echo "Mode: Test before publishing to vcpkg."
fi

here=$(pwd)
thisscript=$(basename $0)
workdir=$here/xdata/$thisscript
argumentumgit="file://$(realpath ../../../argumentum)"
builddir=out/build

if [ -d $workdir ]; then
rm -rf $workdir
fi

if [ ! -d $workdir ]; then
mkdir -p $workdir
fi

create_test_dir() {
local testdir=$workdir/basic
mkdir $testdir
cd $here
cp CMakeLists-installed.txt.in $testdir/CMakeLists.txt
cp -r src $testdir/

cd $testdir
mkdir -p $builddir
}

vcpkg_install_argumentum() {
cd $workdir
if [ "$mode" == "update" ]; then
# Use this repo and branch when preparing a new release.
git clone -b update_argumentum --single-branch https://github.com/mmahnic/vcpkg.git
else
git clone https://github.com/microsoft/vcpkg.git
fi

cd $workdir/vcpkg

if [ "$OSTYPE" == "linux-gnu" ]; then
bash bootstrap-vcpkg.sh
./vcpkg install argumentum
elif [ "$OSTYPE" == "msys" ]; then
cmd.exe /c bootstrap-vcpkg.bat
./vcpkg.exe install argumentum
export VCPKG_DEFAULT_TRIPLET=x64-windows
fi
}

configure() {
cd $workdir/basic
# local debug=--debug-output
cmake -S . -B $builddir $debug -DCMAKE_TOOLCHAIN_FILE=$workdir/vcpkg/scripts/buildsystems/vcpkg.cmake
}

build() {
cd $workdir/basic
# local debug=--debug-output
cmake --build $builddir $debug
}

export CMAKE_TOOLCHAIN_FILE=$workdir/vcpkg/scripts/buildsystems/vcpkg.cmake

create_test_dir
vcpkg_install_argumentum

configure
build

0 comments on commit c9b9dea

Please sign in to comment.