-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add proposal/7.5.1 and update recipe for conan2 #16851
Merged
+130
−91
Merged
Changes from 7 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
98d18c0
add proposal version 7.5.1 and inverse order of versions
Jean1995 e0bfd1b
update proposal package for conan2
Jean1995 338728e
Merge branch 'master' into proposal_conan2
Jean1995 fb12d8a
fix hook errors
Jean1995 a509496
Merge branch 'proposal_conan2' of github.com:Jean1995/conan-center-in…
Jean1995 59e717e
fix wrong license path
Jean1995 78df1f2
Merge branch 'master' into proposal_conan2
Jean1995 c00a2ca
address review comments by @prince-chrismc
Jean1995 6e93a5a
Merge branch 'master' into proposal_conan2
Jean1995 d89467d
self.output.warning instead of self.output.warn
Jean1995 7b697cb
try fixing compile error of testpackage in CI by using transitive hea…
Jean1995 2515577
Merge branch 'master' into proposal_conan2
Jean1995 565ac38
Merge branch 'master' into proposal_conan2
Jean1995 6704c1a
add transitive_headers for cubicinterpolation
Jean1995 b1155ba
fix DSO missing from command line error
Jean1995 9218ba0
proposal: add comments for transitive traits, add logging to test_pac…
jcar87 f8ba957
Merge branch 'master' into proposal_conan2
Jean1995 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,43 @@ | ||
sources: | ||
"7.0.2": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.2.tar.gz" | ||
sha256: "8166ffca150abce77cc4254343bb89d3476e17910e96fa4936b87dafcc72d592" | ||
"7.0.4": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.4.tar.gz" | ||
sha256: "1442b9f5d8824e7794e97a2eca3f5f109e33c423a37714ada9ad98435b4d4b01" | ||
"7.0.5": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.5.tar.gz" | ||
sha256: "232f84e410f439e6bc1b721fc65280906e9f6ad5b39490561870d42a1ee1af17" | ||
"7.0.7": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.7.tar.gz" | ||
sha256: "e366e9280fbe99e68bc5b31a74f51610e27ca8a646dff28e883573893572ab75" | ||
"7.1.0": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.1.0.tar.gz" | ||
sha256: "98faba7cd9d743dae2a8bec70b1c4a382339b9fa40b71fda2936c9d7054d7a85" | ||
"7.1.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.1.1.tar.gz" | ||
sha256: "090e885d6f241b87a98234571cc1bd2ff935933365717e327602ea37f4d3548a" | ||
"7.2.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.2.1.tar.gz" | ||
sha256: "279c1b897c8ae426a493ca77e01c8cfd47e8cd313f3e35ed3ddf098dcccdeeda" | ||
"7.3.0": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.3.0.tar.gz" | ||
sha256: "fa3763fee656164e5f3a7d6a11f08771dd70700adb93de9db4625ad981e0defb" | ||
"7.3.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.3.1.tar.gz" | ||
sha256: "260426f71226c888832a6da47c55c05dab31b8240dbbc67b4b2466af24d962d3" | ||
"7.4.0": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.0.tar.gz" | ||
sha256: "34865a84052c670fbc4554361acef716655906f65f5bba88e3fd73dff92989de" | ||
"7.4.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.1.tar.gz" | ||
sha256: "e6ff9749f402dd77f320a2a28b77a45636cbe186f926d9b5a7b54ea6ee631ada" | ||
"7.4.2": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.2.tar.gz" | ||
sha256: "f0db44c96a80a6ce3dda02c598574f5f0209376bd2c6c176797710da8eb3e108" | ||
"7.5.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.5.1.tar.gz" | ||
sha256: "2a283bfc335c4b6b01d2acc1eea1a5e4c456bd3dd11e41ef24ca3d955c9655a3" | ||
"7.5.0": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.5.0.tar.gz" | ||
sha256: "ba31bd0a2337f3717a1ad88a3b3f7fefa3f1e4dae4fc922e72144cfecffe5e94" | ||
"7.4.2": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.2.tar.gz" | ||
sha256: "f0db44c96a80a6ce3dda02c598574f5f0209376bd2c6c176797710da8eb3e108" | ||
"7.4.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.1.tar.gz" | ||
sha256: "e6ff9749f402dd77f320a2a28b77a45636cbe186f926d9b5a7b54ea6ee631ada" | ||
"7.4.0": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.0.tar.gz" | ||
sha256: "34865a84052c670fbc4554361acef716655906f65f5bba88e3fd73dff92989de" | ||
"7.3.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.3.1.tar.gz" | ||
sha256: "260426f71226c888832a6da47c55c05dab31b8240dbbc67b4b2466af24d962d3" | ||
"7.3.0": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.3.0.tar.gz" | ||
sha256: "fa3763fee656164e5f3a7d6a11f08771dd70700adb93de9db4625ad981e0defb" | ||
"7.2.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.2.1.tar.gz" | ||
sha256: "279c1b897c8ae426a493ca77e01c8cfd47e8cd313f3e35ed3ddf098dcccdeeda" | ||
"7.1.1": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.1.1.tar.gz" | ||
sha256: "090e885d6f241b87a98234571cc1bd2ff935933365717e327602ea37f4d3548a" | ||
"7.1.0": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.1.0.tar.gz" | ||
sha256: "98faba7cd9d743dae2a8bec70b1c4a382339b9fa40b71fda2936c9d7054d7a85" | ||
"7.0.7": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.7.tar.gz" | ||
sha256: "e366e9280fbe99e68bc5b31a74f51610e27ca8a646dff28e883573893572ab75" | ||
"7.0.5": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.5.tar.gz" | ||
sha256: "232f84e410f439e6bc1b721fc65280906e9f6ad5b39490561870d42a1ee1af17" | ||
"7.0.4": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.4.tar.gz" | ||
sha256: "1442b9f5d8824e7794e97a2eca3f5f109e33c423a37714ada9ad98435b4d4b01" | ||
"7.0.2": | ||
url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.2.tar.gz" | ||
sha256: "8166ffca150abce77cc4254343bb89d3476e17910e96fa4936b87dafcc72d592" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conan.tools.cmake import CMake, cmake_layout | ||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" | ||
requires = "spdlog/1.9.2" # TODO: not sure why this is explicitly necessary, but it fails without it | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") | ||
self.run(bin_path, env="conanrun") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package CXX) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
find_package(PROPOSAL REQUIRED CONFIG) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} PROPOSAL::PROPOSAL) | ||
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "PROPOSAL/PROPOSAL.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file can be delete with the improved CMakeLists.txt template :) |
||
#include <iostream> | ||
#include <memory> | ||
|
||
int main() | ||
{ | ||
auto particle = PROPOSAL::MuMinusDef(); | ||
auto target = PROPOSAL::Ice(); | ||
auto cut = std::make_shared<PROPOSAL::EnergyCutSettings>(500, 0.05, false); | ||
auto cross = PROPOSAL::GetStdCrossSections(particle, target, cut, false); | ||
|
||
auto energy = 1e4; | ||
for (auto c : cross) { | ||
auto type = c->GetInteractionType(); | ||
auto name = PROPOSAL::Type_Interaction_Name_Map.at(type); | ||
auto dEdx = c->CalculatedEdx(energy); | ||
std::cout << "The " << name << " average loss for a " << energy << " MeV " | ||
<< particle.name << " in " << target.GetName() | ||
<< " is: " << dEdx << " MeV * cm^2 / g" << std::endl; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
versions: | ||
"7.0.2": | ||
"7.5.1": | ||
folder: all | ||
"7.0.4": | ||
"7.5.0": | ||
folder: all | ||
"7.0.5": | ||
"7.4.2": | ||
folder: all | ||
"7.0.7": | ||
"7.4.1": | ||
folder: all | ||
"7.1.0": | ||
"7.4.0": | ||
folder: all | ||
"7.1.1": | ||
"7.3.1": | ||
folder: all | ||
"7.3.0": | ||
folder: all | ||
"7.2.1": | ||
folder: all | ||
"7.3.0": | ||
"7.1.1": | ||
folder: all | ||
"7.3.1": | ||
"7.1.0": | ||
folder: all | ||
"7.4.0": | ||
"7.0.7": | ||
folder: all | ||
"7.4.1": | ||
"7.0.5": | ||
folder: all | ||
"7.4.2": | ||
"7.0.4": | ||
folder: all | ||
"7.5.0": | ||
"7.0.2": | ||
folder: all |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conan 2.0 changes the graph model and deps are private by default to encourage good software practices.
you need to add a
transitive_header=True
with a link to the reason why it's need (ie a comment from the bot failing is perfect or a link to the source code)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am honestly note sure why I would need to put
transitive_headers=True
for spdlog, but not for any other libraries.If I don't (and do not explicitly write
requires = "spdlog/1.9.2"
in the conanfile of the test_package), I get the errorwhich sounds related to the experience in #11981 and #15832...
I could do this, and this does fix the issue, but I would like to understand why this is necessary 😅