From 531c3bab7a76cb318e3701652acd07ff0eab0c24 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 9 Sep 2020 20:55:36 +0200 Subject: [PATCH] build: conanfile downcasting definitions fixed --- conanfile.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/conanfile.py b/conanfile.py index aa012bae..525926ba 100644 --- a/conanfile.py +++ b/conanfile.py @@ -49,10 +49,10 @@ class UnitsConan(ConanFile): "ms-gsl/3.1.0" ) options = { - "downcast": ["off", "on", "auto"] + "downcast_mode": ["off", "on", "auto"] } default_options = { - "downcast": "on" + "downcast_mode": "on" } exports = ["LICENSE.md"] exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"] @@ -83,12 +83,12 @@ class UnitsConan(ConanFile): def _configure_cmake(self, folder="src"): cmake = CMake(self) - if self.options.downcast_dispatch_mode == "off": - cmake.definitions["UNITS_DOWNCAST"] = 0 - elif self.options.downcast_dispatch_mode == "on": - cmake.definitions["UNITS_DOWNCAST"] = 1 - elif self.options.downcast_dispatch_mode == "auto": - cmake.definitions["UNITS_DOWNCAST"] = 2 + if self.options.downcast_mode == "off": + cmake.definitions["DOWNCAST_MODE"] = 0 + elif self.options.downcast_mode == "on": + cmake.definitions["DOWNCAST_MODE"] = 1 + elif self.options.downcast_mode == "auto": + cmake.definitions["DOWNCAST_MODE"] = 2 if self._run_tests: # developer's mode (unit tests, examples, documentation, restrictive compilation warnings, ...)