mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-31 02:47:16 +02:00
Improved usage of the library as a dependency
This commit is contained in:
Submodule cmake/common updated: 6a92dc3f21...1c11b6ed26
@ -67,7 +67,7 @@ class UnitsConan(ConanFile):
|
|||||||
cmake.configure()
|
cmake.configure()
|
||||||
else:
|
else:
|
||||||
# consumer's mode (library sources only)
|
# consumer's mode (library sources only)
|
||||||
cmake.configure(source_folder=folder, build_folder=folder)
|
cmake.configure(source_folder=folder)
|
||||||
return cmake
|
return cmake
|
||||||
|
|
||||||
def configure(self):
|
def configure(self):
|
||||||
@ -95,7 +95,7 @@ class UnitsConan(ConanFile):
|
|||||||
cmake = self._configure_cmake()
|
cmake = self._configure_cmake()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
if self._run_tests:
|
if self._run_tests:
|
||||||
cmake.test()
|
cmake.test(output_on_failure=True)
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
self.copy(pattern="LICENSE.md", dst="licenses")
|
self.copy(pattern="LICENSE.md", dst="licenses")
|
||||||
|
@ -33,6 +33,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
|||||||
# include common tools and workarounds
|
# include common tools and workarounds
|
||||||
include(common/cmake/scripts)
|
include(common/cmake/scripts)
|
||||||
|
|
||||||
|
# use Conan configuration if available
|
||||||
|
conan_init(cmake)
|
||||||
|
|
||||||
# library definition
|
# library definition
|
||||||
add_library(units INTERFACE)
|
add_library(units INTERFACE)
|
||||||
#target_sources(units INTERFACE
|
#target_sources(units INTERFACE
|
||||||
|
Reference in New Issue
Block a user