mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 10:27:16 +02:00
build: Conan 1.40 support fixed
This commit is contained in:
@ -101,9 +101,6 @@ class UnitsConan(ConanFile):
|
|||||||
# # build_docs has sense only in a development or CI build
|
# # build_docs has sense only in a development or CI build
|
||||||
# del self.options.build_docs
|
# del self.options.build_docs
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
self.folders.source="." if self._run_tests else "src"
|
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
tc = CMakeToolchain(self)
|
tc = CMakeToolchain(self)
|
||||||
tc.variables["UNITS_DOWNCAST_MODE"] = str(self.options.downcast_mode).upper()
|
tc.variables["UNITS_DOWNCAST_MODE"] = str(self.options.downcast_mode).upper()
|
||||||
@ -115,7 +112,7 @@ class UnitsConan(ConanFile):
|
|||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.configure()
|
cmake.configure(build_script_folder=None if self._run_tests else "src")
|
||||||
cmake.build()
|
cmake.build()
|
||||||
if self._run_tests:
|
if self._run_tests:
|
||||||
cmake.test(output_on_failure=True)
|
cmake.test(output_on_failure=True)
|
||||||
|
Reference in New Issue
Block a user