Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed Jul 14, 2022
1 parent 20591bc commit 24d8910
Show file tree
Hide file tree
Showing 8 changed files with 804 additions and 288 deletions.
4 changes: 2 additions & 2 deletions recipes/userspace-rcu/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class UserspaceRCUConan(ConanFile):
name = "userspace-rcu"
homepage ="https://liburcu.org/"
description = "Userspace RCU (read-copy-update) library"
topics = ("conan", "urcu")
topics = ("urcu")
url = "https://github.com/conan-io/conan-center-index"
license = "LGPLv2.1"
license = "LGPL-2.1"

@property
def _source_subfolder(self):
Expand Down
3 changes: 1 addition & 2 deletions recipes/userspace-rcu/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
cmake_minimum_required(VERSION 3.1)
project(test_package)
set(CMAKE_CXX_STANDARD 14)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

find_package(userspace-rcu REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
add_executable(${PROJECT_NAME} test_urcu_fork.c tap.c)
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
11 changes: 6 additions & 5 deletions recipes/userspace-rcu/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
from conans import ConanFile, CMake, tools
from conans import ConanFile, CMake
from conan.tools.build import cross_building
import os


class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "cmake", "cmake_find_package_multi"

requires = (
"benchmark/1.6.1",
)
def configure(self):
del self.settings.compiler.libcxx
del self.settings.compiler.cppstd

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self):
if not cross_building(self):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
Loading

0 comments on commit 24d8910

Please sign in to comment.