mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 20:54:28 +02:00
ms-gsl dependency added to handle Expects (resolves #132)
This commit is contained in:
@@ -46,7 +46,8 @@ class UnitsConan(ConanFile):
|
|||||||
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
|
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
requires = (
|
requires = (
|
||||||
"fmt/6.2.1"
|
"fmt/6.2.1",
|
||||||
|
"ms-gsl/3.1.0"
|
||||||
)
|
)
|
||||||
# scm = {
|
# scm = {
|
||||||
# "type": "git",
|
# "type": "git",
|
||||||
|
@@ -16,7 +16,8 @@ This repository contains three independent CMake-based projects:
|
|||||||
- header-only project containing whole **mp-units** library
|
- header-only project containing whole **mp-units** library
|
||||||
- when C++20 support will be fully supported by C++ compilers this library will have
|
- when C++20 support will be fully supported by C++ compilers this library will have
|
||||||
no external dependencies but until then it depends on
|
no external dependencies but until then it depends on
|
||||||
`range-v3 <https://github.com/ericniebler/range-v3>`_ (only for gcc versions < 10.0)
|
`range-v3 <https://github.com/ericniebler/range-v3>`_ (only for gcc versions < 10.0),
|
||||||
|
`ms-gsl <https://github.com/microsoft/GSL>`_,
|
||||||
and `{fmt} <https://github.com/fmtlib/fmt>`_ libraries.
|
and `{fmt} <https://github.com/fmtlib/fmt>`_ libraries.
|
||||||
|
|
||||||
- *.*
|
- *.*
|
||||||
|
@@ -56,6 +56,7 @@ target_compile_features(units INTERFACE cxx_std_20)
|
|||||||
target_link_libraries(units
|
target_link_libraries(units
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<IF:$<TARGET_EXISTS:CONAN_PKG::fmt>,CONAN_PKG::fmt,fmt::fmt>
|
$<IF:$<TARGET_EXISTS:CONAN_PKG::fmt>,CONAN_PKG::fmt,fmt::fmt>
|
||||||
|
$<IF:$<TARGET_EXISTS:CONAN_PKG::ms-gsl>,CONAN_PKG::ms-gsl,Microsoft.GSL::GSL>
|
||||||
)
|
)
|
||||||
target_include_directories(units
|
target_include_directories(units
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <gsl/gsl>
|
||||||
|
|
||||||
namespace units::detail {
|
namespace units::detail {
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <units/bits/external/fixed_string.h>
|
#include <units/bits/external/fixed_string.h>
|
||||||
#include <units/bits/external/hacks.h>
|
#include <units/bits/external/hacks.h>
|
||||||
|
#include <gsl/gsl>
|
||||||
|
|
||||||
namespace units {
|
namespace units {
|
||||||
|
|
||||||
|
@@ -24,13 +24,6 @@
|
|||||||
|
|
||||||
#include <concepts/concepts.hpp>
|
#include <concepts/concepts.hpp>
|
||||||
|
|
||||||
#ifdef NDEBUG
|
|
||||||
#define Expects(cond) (void)(cond);
|
|
||||||
#else
|
|
||||||
#include <cassert>
|
|
||||||
#define Expects(cond) assert(cond);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
// concepts
|
// concepts
|
||||||
|
Reference in New Issue
Block a user