From 6a3865b45523595274cf2d77112d874226668856 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Mon, 14 Sep 2020 12:50:51 +0200 Subject: [PATCH] build: header-only mode enabled for Conan --- conanfile.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/conanfile.py b/conanfile.py index b81bb763..68470829 100644 --- a/conanfile.py +++ b/conanfile.py @@ -79,7 +79,8 @@ class UnitsConan(ConanFile): raise ConanInvalidConfiguration("mp-units requires at least Visual Studio 16") else: raise ConanInvalidConfiguration("mp-units is supported only by gcc and Visual Studio so far") - check_min_cppstd(self, "20") + if compiler.get_safe("cppstd"): + check_min_cppstd(self, "20") def _configure_cmake(self, folder="src"): cmake = CMake(self) @@ -119,9 +120,7 @@ class UnitsConan(ConanFile): cmake.install() def package_id(self): - self.info.settings.clear() - self.info.settings.compiler = self.settings.compiler - self.info.settings.compiler.version = self.settings.compiler.version + self.info.header_only() def package_info(self): compiler = self.settings.compiler