ms-gsl dependency added to handle Expects (resolves #132)

This commit is contained in:
Mateusz Pusz
2020-08-17 20:27:45 +02:00
parent 1748aff42b
commit 51b6d2f974
6 changed files with 7 additions and 9 deletions

View File

@@ -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",

View File

@@ -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.
- *.* - *.*

View File

@@ -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

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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