From 497a13da1ad25cd8267edfce4b9a4172757f6d77 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 10 Sep 2019 20:07:48 +0200 Subject: [PATCH] Dependency on gsl-lite removed as it causes issues with compiler-explorer --- conanfile.py | 3 +-- src/CMakeLists.txt | 1 - src/include/units/bits/hacks.h | 4 ++++ src/include/units/quantity.h | 1 - src/include/units/ratio.h | 2 +- test/metabench/CMakeLists.txt | 1 - test/metabench/ratio/ratio_type_constexpr.h | 4 +++- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/conanfile.py b/conanfile.py index 507fec63..2b532803 100644 --- a/conanfile.py +++ b/conanfile.py @@ -45,8 +45,7 @@ class UnitsConan(ConanFile): exports = ["LICENSE.md"] settings = "os", "compiler", "build_type", "arch" requires = ( - "cmcstl2/2019.09.09@mpusz/stable", - "gsl-lite/0.33.0@nonstd-lite/stable" + "cmcstl2/2019.09.09@mpusz/stable" ) scm = { "type": "git", diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 759d2568..034f6510 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,7 +54,6 @@ target_compile_features(units INTERFACE cxx_std_20) target_link_libraries(units INTERFACE CONAN_PKG::cmcstl2 - CONAN_PKG::gsl-lite ) target_include_directories(units INTERFACE diff --git a/src/include/units/bits/hacks.h b/src/include/units/bits/hacks.h index 84231ecc..200deeae 100644 --- a/src/include/units/bits/hacks.h +++ b/src/include/units/bits/hacks.h @@ -23,6 +23,10 @@ #pragma once #include +#include + + +#define Expects(cond) if(!(cond)) ::std::terminate(); namespace std { diff --git a/src/include/units/quantity.h b/src/include/units/quantity.h index 61bbde5a..e29c8d6e 100644 --- a/src/include/units/quantity.h +++ b/src/include/units/quantity.h @@ -25,7 +25,6 @@ #include #include #include -#include namespace std::experimental::units { diff --git a/src/include/units/ratio.h b/src/include/units/ratio.h index 32f53faa..ce835212 100644 --- a/src/include/units/ratio.h +++ b/src/include/units/ratio.h @@ -22,10 +22,10 @@ #pragma once +#include #include #include #include -#include namespace std::experimental::units { diff --git a/test/metabench/CMakeLists.txt b/test/metabench/CMakeLists.txt index 8c8d4985..c1188dc1 100644 --- a/test/metabench/CMakeLists.txt +++ b/test/metabench/CMakeLists.txt @@ -27,7 +27,6 @@ function(add_metabench_test target name erb_path range) target_link_libraries(${target} PUBLIC CONAN_PKG::cmcstl2 - CONAN_PKG::gsl-lite ) endfunction() diff --git a/test/metabench/ratio/ratio_type_constexpr.h b/test/metabench/ratio/ratio_type_constexpr.h index f344a168..ffa7f94d 100644 --- a/test/metabench/ratio/ratio_type_constexpr.h +++ b/test/metabench/ratio/ratio_type_constexpr.h @@ -22,10 +22,12 @@ #pragma once +#include #include #include #include -#include + +#define Expects(cond) if(!(cond)) ::std::terminate(); namespace std::experimental::units {