Skip to content

Commit

Permalink
Updated UDBM-2.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
mikucionisaau committed Sep 15, 2023
1 parent 15cc83a commit b2f12c0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 80 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,31 @@ In addition, [UUtils](https://github.com/UPPAALModelChecker/UUtils) and [UDBM](h
Get the dependencies, compile the source into `build` directory and run the unit tests:
```sh
unset CMAKE_TOOLCHAIN_FILE # If it was set before
./getlibs.sh # If UUtils and UDBM are not installed system-wide
cmake -B build -DTESTING=ON
cmake -B build
cmake --build build
(cd build ; ctest --output-on-failure)
```

### Cross-compile For Linux 32-bit (i686):
```sh
export CMAKE_TOOLCHAIN_FILE=$PWD/toolchains/i686-linux.cmake
./getlibs.sh
cmake -B build-linux32 -DTESTING=ON
export CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/i686-linux.cmake
cmake -B build-linux32
cmake --build build-linux32
(cd build-linux32 ; ctest --output-on-failure)
```

### Cross-compile For Windows 64-bit (x64_86) using MinGW/[MSYS2](https://www.msys2.org/):
```sh
export CMAKE_TOOLCHAIN_FILE=$PWD/toolchains/x86_64-w64-mingw32.cmake
./getlibs.sh
cmake -B build-win64 -DTESTING=ON -DSTATIC=ON
export CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/x86_64-w64-mingw32.cmake
cmake -B build-win64 -DSTATIC=ON
cmake --build build-win64
(cd build-win64 ; ctest --output-on-failure)
```

### Cross-compile For Windows 32-bit (i686) using MinGW/[MSYS2](https://www.msys2.org/):
```sh
export CMAKE_TOOLCHAIN_FILE=$PWD/toolchains/i686-w64-mingw32.cmake
./getlibs.sh
cmake -B build-win32 -DTESTING=ON -DSTATIC=ON
export CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/i686-w64-mingw32.cmake
cmake -B build-win32 -DSTATIC=ON
cmake --build build-win32
(cd build-win32 ; ctest --output-on-failure)
```
Expand Down
4 changes: 2 additions & 2 deletions cmake/UDBM.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
find_package(UDBM 2.0.13 QUIET)
find_package(UDBM 2.0.14 QUIET)

if (UDBM_FOUND)
message(STATUS "Found UDBM: ${UDBM_DIR}")
Expand All @@ -12,7 +12,7 @@ else(UDBM_FOUND)
FetchContent_Declare(
UDBM
GIT_REPOSITORY https://github.com/UPPAALModelChecker/UDBM.git
GIT_TAG v2.0.13
GIT_TAG v2.0.14
GIT_SHALLOW TRUE # get only the last commit version
GIT_PROGRESS TRUE # show progress of download
# FIND_PACKAGE_ARGS NAMES doctest
Expand Down
65 changes: 2 additions & 63 deletions getlibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ for target in $targets ; do

# UDBM Uppaal Difference Bound Matrix library
NAME=UDBM
VERSION=2.0.13
VERSION=2.0.14
LIBRARY="${NAME}-${VERSION}"
ARCHIVE="${LIBRARY}.tar.gz"
SHA256=dd5d2b13997aae1669d6efca0901a5d44c323469d0fd945e518bffbfb058f414
SHA256=019ac8ea4ca52ebd4d4aedf50f3a039648776b62b854534e0c678004fec25b08
SOURCE="${SOURCES}/${LIBRARY}"
BUILD="${PREFIX}/build-${LIBRARY}"
if [ -r "$PREFIX/include/dbm/config.h" ]; then
Expand All @@ -148,66 +148,5 @@ for target in $targets ; do
rm -Rf "$BUILD"
rm -Rf "$SOURCE"
fi

# ## BOOST
# NAME=boost
# VERSION=1.83.0
# LIBRARY="${NAME}-${VERSION}"
# ARCHIVE="$LIBRARY.tar.xz"
# SHA256=c5a0688e1f0c05f354bbd0b32244d36085d9ffc9f932e8a18983a9908096f614
# SOURCE="${SOURCES}/$LIBRARY"
# BUILD="${PREFIX}/build-$LIBRARY"
# if [ -r "${CMAKE_INSTALL_PREFIX}/include/boost/math/distributions/arcsine.hpp" ] ; then
# echo "$LIBRARY is already installed in $CMAKE_INSTALL_PREFIX"
# else
# pushd "$SOURCES"
# [ -r "${ARCHIVE}" ] || curl -sL "https://github.com/boostorg/boost/releases/download/$LIBRARY/$LIBRARY.tar.xz" -o "${ARCHIVE}"
# if [ -n "$(command -v sha256sum)" ]; then echo "$SHA256 $ARCHIVE" | sha256sum --check ; fi
# [ -d "${SOURCE}" ] || tar xf "${ARCHIVE}"
# popd
# echo "Building $LIBRARY in $BUILD from $SOURCE"
# echo " CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE:-(unset)}"
# echo " CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-(unset)}"
# echo " CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:-(unset)}"
# echo " CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-(unset)}"
# cmake -S "$SOURCE" -B "$BUILD" -DBUILD_SHARED_LIBS=OFF \
# -DBOOST_INCLUDE_LIBRARIES="headers;math" -DBOOST_ENABLE_MPI=OFF -DBOOST_ENABLE_PYTHON=OFF \
# -DBOOST_RUNTIME_LINK=static -DBUILD_TESTING=OFF -DBOOST_USE_STATIC_LIBS=ON -DBOOST_USE_DEBUG_LIBS=ON \
# -DBOOST_USE_RELEASE_LIBS=ON -DBOOST_USE_STATIC_RUNTIME=ON -DBOOST_INSTALL_LAYOUT=system -DBOOST_ENABLE_CMAKE=ON
# cmake --build "$BUILD" --config $CMAKE_BUILD_TYPE
# cmake --install "$BUILD" --config $CMAKE_BUILD_TYPE --prefix "${CMAKE_INSTALL_PREFIX}"
# rm -Rf "$BUILD"
# rm -Rf "$SOURCE"
# fi
#
# ## Google Benchmark
# NAME=benchmark
# VERSION=1.8.3 # v1.8.2 fails with "-lrt not found" on win64
# LIBRARY="${NAME}-${VERSION}"
# ARCHIVE="${LIBRARY}.tar.gz"
# SHA256=6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce
# SOURCE="${SOURCES}/${LIBRARY}"
# BUILD="${PREFIX}/build-${LIBRARY}"
# if [ -r "${CMAKE_INSTALL_PREFIX}/include/benchmark/benchmark.h" ] ; then
# echo "$LIBRARY is already installed in $CMAKE_INSTALL_PREFIX"
# else
# pushd "$SOURCES"
# [ -r "$ARCHIVE" ] || curl -sL "https://github.com/google/benchmark/archive/refs/tags/v${VERSION}.tar.gz" -o "$ARCHIVE"
# if [ -n "$(command -v sha256sum)" ]; then echo "$SHA256 $ARCHIVE" | sha256sum --check ; fi
# [ -d "$LIBRARY" ] || tar -xf "$ARCHIVE"
# popd
# echo "Building $LIBRARY in $BUILD from $SOURCE"
# echo " CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE:-(unset)}"
# echo " CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-(unset)}"
# echo " CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:-(unset)}"
# echo " CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-(unset)}"
# cmake -S "$SOURCE" -B "$BUILD" -DBUILD_SHARED_LIBS=OFF \
# -DBENCHMARK_ENABLE_TESTING=OFF -DBENCHMARK_ENABLE_EXCEPTIONS=ON -DBENCHMARK_ENABLE_LTO=OFF \
# -DBENCHMARK_USE_LIBCXX=OFF -DBENCHMARK_ENABLE_WERROR=ON -DBENCHMARK_FORCE_WERROR=OFF
# cmake --build "$BUILD" --config $CMAKE_BUILD_TYPE
# cmake --install "$BUILD" --config $CMAKE_BUILD_TYPE --prefix "${CMAKE_INSTALL_PREFIX}"
# rm -Rf "$BUILD"
# rm -Rf "$SOURCE"
# fi
echo "GETLIBS $target success!"
done
9 changes: 5 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ target_link_libraries(UCDD PUBLIC xxHash PRIVATE UDBM)
add_library(UCDD::UCDD ALIAS UCDD)

target_include_directories(UCDD
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
PUBLIC
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> # cdd/config.h
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

install(TARGETS UCDD xxHash EXPORT UCDDConfig FILE_SET xxhash_headers)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/cdd DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

0 comments on commit b2f12c0

Please sign in to comment.