Runtime test execution added to Conan

This commit is contained in:
Mateusz Pusz
2020-02-20 21:16:33 +01:00
parent 600d2cb12c
commit 21f3041bfb
2 changed files with 5 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ class UnitsConan(ConanFile):
cmake = self._configure_cmake()
cmake.build()
if self._run_tests:
self.run("ctest -VV -C %s" % cmake.build_type, run_environment=True)
cmake.test()
def package(self):
self.copy(pattern="LICENSE.md", dst="licenses")

View File

@@ -35,3 +35,7 @@ target_link_libraries(unit_tests_runtime
mp::units
CONAN_PKG::Catch2
)
include(CTest)
include(lib/cmake/Catch2/Catch)
catch_discover_tests(unit_tests_runtime)