Skip to content

Commit 8333082

Browse files
authored
Merge branch 'conan-io:master' into master
2 parents 212d23c + 6290690 commit 8333082

File tree

380 files changed

+3019
-4644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+3019
-4644
lines changed

recipes/activemq-cpp/all/conanfile.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from conan.tools.apple import fix_apple_shared_install_name
55
from conan.tools.build import check_max_cppstd, check_min_cppstd, cross_building
66
from conan.tools.env import VirtualRunEnv
7-
from conan.tools.files import copy, get, rm, rmdir
7+
from conan.tools.files import copy, get, rm, rmdir, replace_in_file
88
from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps
99
from conan.tools.layout import basic_layout
1010

@@ -34,10 +34,10 @@ def layout(self):
3434
basic_layout(self, src_folder="src")
3535

3636
def requirements(self):
37-
self.requires("apr/[>=1.3]")
37+
self.requires("apr/[>=1.3]", transitive_headers=True)
3838
self.requires("apr-util/[>=1.3]")
3939
self.requires("libuuid/[>=1.0.3]")
40-
self.requires("openssl/[>=1.1 <4]")
40+
self.requires("openssl/[>=1.1 <4]", transitive_headers=True)
4141

4242
def validate(self):
4343
check_min_cppstd(self, 11)
@@ -48,6 +48,9 @@ def build_requirements(self):
4848

4949
def source(self):
5050
get(self, **self.conan_data["sources"][self.version], strip_root=True)
51+
replace_in_file(self, os.path.join(self.source_folder, "activemq-cpp", "Makefile.am"),
52+
"SUBDIRS = src/main src/examples",
53+
"SUBDIRS = src/main")
5154

5255
def generate(self):
5356
if not cross_building(self):
@@ -94,6 +97,7 @@ def package_info(self):
9497
self.cpp_info.libs = ["activemq-cpp"]
9598

9699
self.cpp_info.set_property("pkg_config_name", "activemq-cpp")
100+
self.cpp_info.defines = ["HAVE_OPENSSL"]
97101

98102
if self.settings.os in ["Linux", "FreeBSD", "Macos"]:
99103
self.cpp_info.system_libs.extend(["dl", "m", "pthread"])

recipes/alpaka/all/conandata.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sources:
2+
"2.1.1":
3+
url: "https://github.com/alpaka-group/alpaka/archive/refs/tags/2.1.1.tar.gz"
4+
sha256: "2d30a43594c55067297947b0ec83300e4f2899497464c5cc6f142c823f3ea1b2"
5+

recipes/alpaka/all/conanfile.py

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
from conan import ConanFile
2+
from conan.tools.build import check_min_cppstd
3+
from conan.tools.cmake import CMake, cmake_layout
4+
from conan.tools.files import copy, get, rmdir
5+
import os
6+
7+
required_conan_version = ">=2.0"
8+
9+
10+
class AlpakaConan(ConanFile):
11+
name = "alpaka"
12+
description = "The alpaka library is a header-only C++20 abstraction library for accelerator development"
13+
license = "MPL-2.0"
14+
url = "https://github.com/conan-io/conan-center-index"
15+
homepage = "https://github.com/alpaka-group/alpaka"
16+
topics = ("hpc", "cuda", "hip", "sycl", "gpu", "heterogeneous-computing")
17+
18+
package_type = "header-library"
19+
settings = "os", "arch", "compiler", "build_type"
20+
generators = "CMakeDeps", "CMakeToolchain"
21+
22+
def layout(self):
23+
cmake_layout(self, src_folder="src")
24+
25+
def requirements(self):
26+
self.requires("boost/[>=1.74.0 <2]")
27+
28+
def build_requirements(self):
29+
self.tool_requires("cmake/[>=3.25]")
30+
31+
def package_id(self):
32+
self.info.clear()
33+
34+
def validate(self):
35+
check_min_cppstd(self, 20)
36+
37+
def source(self):
38+
get(self, **self.conan_data["sources"][self.version], strip_root=True)
39+
40+
def build(self):
41+
cmake = CMake(self)
42+
cmake.configure()
43+
cmake.build()
44+
45+
def package(self):
46+
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
47+
cmake = CMake(self)
48+
cmake.install()
49+
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
50+
51+
def package_info(self):
52+
self.cpp_info.bindirs = []
53+
self.cpp_info.libdirs = []
54+
55+
self.cpp_info.requires = ["boost::headers"]
56+
57+
if self.settings.os in ["Linux", "FreeBSD"]:
58+
self.cpp_info.system_libs.extend(["pthread", "rt"])
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
project(test_package LANGUAGES CXX)
3+
4+
find_package(alpaka REQUIRED CONFIG)
5+
6+
add_executable(${PROJECT_NAME} test_package.cpp)
7+
target_link_libraries(${PROJECT_NAME} PRIVATE alpaka::alpaka)

recipes/resiprocate/all/test_package/conanfile.py renamed to recipes/alpaka/all/test_package/conanfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
class TestPackageConan(ConanFile):
88
settings = "os", "arch", "compiler", "build_type"
9-
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
10-
test_type = "explicit"
11-
12-
def requirements(self):
13-
self.requires(self.tested_reference_str)
9+
generators = "CMakeDeps", "CMakeToolchain"
1410

1511
def layout(self):
1612
cmake_layout(self)
1713

14+
def requirements(self):
15+
self.requires(self.tested_reference_str)
16+
1817
def build(self):
1918
cmake = CMake(self)
2019
cmake.configure()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <alpaka/alpaka.hpp>
2+
3+
#include <iostream>
4+
5+
int main() {
6+
std::cout << "alpaka version: "
7+
<< ALPAKA_VERSION_MAJOR << "."
8+
<< ALPAKA_VERSION_MINOR << "."
9+
<< ALPAKA_VERSION_PATCH << std::endl;
10+
11+
// List enabled accelerator tags
12+
std::cout << "Enabled accelerator tags:" << std::endl;
13+
alpaka::printTagNames<alpaka::EnabledAccTags>();
14+
15+
return 0;
16+
}
17+

recipes/alpaka/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
versions:
2+
"2.1.1":
3+
folder: all
4+

recipes/apr-util/all/conanfile.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir
88
from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain
99
from conan.tools.layout import basic_layout
10-
from conan.tools.microsoft import is_msvc
1110
import os
1211

1312
required_conan_version = ">=1.54.0"
@@ -92,7 +91,7 @@ def requirements(self):
9291
if self.options.with_expat:
9392
self.requires("expat/[>=2.6.2 <3]")
9493
if self.options.with_postgresql:
95-
self.requires("libpq/15.4")
94+
self.requires("libpq/[>=15.4 <18]")
9695

9796
def validate(self):
9897
if not self.options.with_expat:
@@ -213,9 +212,3 @@ def package_info(self):
213212
libdirs = [p for dep in deps for p in dep.cpp_info.aggregated_components().libdirs]
214213
aprutil_ldflags = " ".join([f"-L{p}" for p in libdirs])
215214
self.runenv_info.define("APRUTIL_LDFLAGS", aprutil_ldflags)
216-
217-
# TODO: to remove in conan v2
218-
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
219-
self.env_info.APR_UTIL_ROOT = self.package_folder
220-
if not is_msvc(self):
221-
self.env_info.APRUTIL_LDFLAGS = aprutil_ldflags

recipes/apr-util/all/test_v1_package/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

recipes/apr-util/all/test_v1_package/conanfile.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)