Skip to content

Commit

Permalink
Upgraded library dependencies and enabed warnings (#27)
Browse files Browse the repository at this point in the history
- [x] removed `rangeset.h`
- [x] fixed Boost library dependencies
- [x] Upgraded Boost to 1.86
- [x] Upgraded GoogleBenchmark to 1.9.0
- [x] Enabled compiler warnings
  • Loading branch information
mikucionisaau authored Oct 13, 2024
2 parents 3237aa3 + 8173ecc commit 65fbb73
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 598 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0048 NEW) # project() command manages VERSION variables
project(UUtils VERSION 2.0.5 HOMEPAGE_URL "https://github.com/UPPAALModelChecker/UUtils" LANGUAGES CXX C)
project(UUtils VERSION 2.0.6 HOMEPAGE_URL "https://github.com/UPPAALModelChecker/UUtils" LANGUAGES CXX C)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
include(FetchContent)
Expand Down
2 changes: 1 addition & 1 deletion cmake/boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(Boost_USE_RELEASE_LIBS ON) # only find release libs
set(Boost_USE_STATIC_RUNTIME ON) # Mac insists on ON for boost_program_options
#set(BOOST_USE_MULTITHREADED ON)
#set(Boost_DEBUG ON)
set(Boost_VERSION 1.83.0)
set(Boost_VERSION 1.86.0)

if (BOOST_INCLUDE_LIBRARIES)
find_package(Boost ${Boost_VERSION} COMPONENTS ${BOOST_INCLUDE_LIBRARIES} QUIET PATHS /usr)
Expand Down
10 changes: 10 additions & 0 deletions cmake/stdcpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wpedantic -Wall -Wextra -Wno-unused-parameter)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Wpedantic -Wall -Wextra)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/W4)
endif()
endif ()
18 changes: 9 additions & 9 deletions getlibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@ for target in $targets ; do

## BOOST
NAME=boost
VERSION=1.83.0
VERSION=1.86.0
LIBRARY="${NAME}-${VERSION}"
ARCHIVE="$LIBRARY.tar.xz"
SHA256=c5a0688e1f0c05f354bbd0b32244d36085d9ffc9f932e8a18983a9908096f614
SOURCE="${SOURCES}/$LIBRARY"
BUILD="${PREFIX}/build-$LIBRARY"
ARCHIVE="${LIBRARY}-cmake.tar.xz"
SHA256=2c5ec5edcdff47ff55e27ed9560b0a0b94b07bd07ed9928b476150e16b0efc57
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}"
[ -r "$ARCHIVE" ] || curl -sL "https://github.com/boostorg/boost/releases/download/${LIBRARY}/${LIBRARY}-cmake.tar.xz" -o "$ARCHIVE"
if [ -n "$(command -v sha256sum)" ]; then echo "$SHA256 $ARCHIVE" | sha256sum --check ; fi
[ -d "${SOURCE}" ] || tar xf "${ARCHIVE}"
[ -d "$SOURCE" ] || tar xf "$ARCHIVE"
popd
echo "Building $LIBRARY in $BUILD from $SOURCE"
echo " CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE:-(unset)}"
Expand Down Expand Up @@ -122,10 +122,10 @@ for target in $targets ; do

## Google Benchmark
NAME=benchmark
VERSION=1.8.3 # v1.8.2 fails with "-lrt not found" on win64
VERSION=1.9.0 # v1.8.2 fails with "-lrt not found" on win64
LIBRARY="${NAME}-${VERSION}"
ARCHIVE="${LIBRARY}.tar.gz"
SHA256=6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce
SHA256=35a77f46cc782b16fac8d3b107fbfbb37dcd645f7c28eee19f3b8e0758b48994
SOURCE="${SOURCES}/${LIBRARY}"
BUILD="${PREFIX}/build-${LIBRARY}"
if [ -r "${CMAKE_INSTALL_PREFIX}/include/benchmark/benchmark.h" ] ; then
Expand Down
Loading

0 comments on commit 65fbb73

Please sign in to comment.