build: update dependencies to gsl-lite/0.42.0, ms-gsl/4.1.0, fmt/11.1.4, and catch2/3.8.0, and suppress warnings for gcc-12

This commit is contained in:
Mateusz Pusz
2025-04-29 13:03:04 +02:00
parent 4624367e8a
commit d441a90164
2 changed files with 9 additions and 4 deletions

View File

@ -209,17 +209,17 @@ class MPUnitsConan(ConanFile):
def requirements(self): def requirements(self):
if not self.options.freestanding: if not self.options.freestanding:
if self.options.contracts == "gsl-lite": if self.options.contracts == "gsl-lite":
self.requires("gsl-lite/0.41.0", transitive_headers=True) self.requires("gsl-lite/0.42.0", transitive_headers=True)
elif self.options.contracts == "ms-gsl": elif self.options.contracts == "ms-gsl":
self.requires("ms-gsl/4.0.0", transitive_headers=True) self.requires("ms-gsl/4.1.0", transitive_headers=True)
if not self.options.std_format: if not self.options.std_format:
self.requires("fmt/11.1.1", transitive_headers=True) self.requires("fmt/11.1.4", transitive_headers=True)
def build_requirements(self): def build_requirements(self):
self.tool_requires("cmake/[>=3.31 <4]") self.tool_requires("cmake/[>=3.31 <4]")
if self._build_all: if self._build_all:
if not self.options.freestanding: if not self.options.freestanding:
self.test_requires("catch2/3.7.0") self.test_requires("catch2/3.8.0")
if not self._skip_la: if not self._skip_la:
self.test_requires("wg21-linear_algebra/0.7.3") self.test_requires("wg21-linear_algebra/0.7.3")

View File

@ -163,6 +163,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION
target_compile_options(mp-units-core ${${projectPrefix}TARGET_SCOPE} "-Wno-unused-result") target_compile_options(mp-units-core ${${projectPrefix}TARGET_SCOPE} "-Wno-unused-result")
endif() endif()
# usage of uninitialized variable in c++/12/bits/char_traits.h
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
target_compile_options(mp-units-core ${${projectPrefix}TARGET_SCOPE} "-Wno-maybe-uninitialized")
endif()
# time-trace # time-trace
if(${projectPrefix}DEV_TIME_TRACE STREQUAL "ALL") if(${projectPrefix}DEV_TIME_TRACE STREQUAL "ALL")
target_compile_options(mp-units-core ${${projectPrefix}TARGET_SCOPE} "-ftime-trace") target_compile_options(mp-units-core ${${projectPrefix}TARGET_SCOPE} "-ftime-trace")