Skip to content

Commit

Permalink
Use cmake support for testing boost package
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
uilianries committed Mar 2, 2023
1 parent 40b4eda commit 3e3f74a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions recipes/boost/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)

include(CTest)
enable_testing()

if(BOOST_NAMESPACE)
Expand Down
9 changes: 3 additions & 6 deletions recipes/boost/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from conan.tools.build import can_run
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import chdir
from conan.tools.scm import Version


class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
Expand Down Expand Up @@ -56,7 +54,6 @@ def build(self):
cmake.build()

def test(self):
if not can_run(self):
return
with chdir(self, self.folders.build_folder):
self.run(f"ctest --output-on-failure -C {self.settings.build_type}", env="conanrun")
if can_run(self):
cmake = CMake(self)
cmake.test()

0 comments on commit 3e3f74a

Please sign in to comment.