Skip to content
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 TinyAD #24655

Merged
merged 5 commits into from
Oct 1, 2024
Merged

Add TinyAD #24655

merged 5 commits into from
Oct 1, 2024

Conversation

jjcasmar
Copy link
Contributor

Summary

Changes to recipe: tinyad/cci.20240718

Motivation

TinyAD is a library for automatic differentiation, presented at Eurographics Symposium on Geometry Processing 2022

Details

Add the library


@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@valgur
Copy link
Contributor

valgur commented Jul 18, 2024

The project relies on OpenMP and warns when it is unavailable. The package would really benefit from #22360. For now you will have to export the appropriate compiler and linker flags for each separate compiler to make sure it's enabled and linked against by the consuming projects.

Comment on lines 32 to 38

def generate(self):
deps = CMakeDeps(self)
deps.generate()

tc = CMakeToolchain(self)
tc.generate()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)
tc.generate()

The recipe is not building anything so these are not needed.

Comment on lines 46 to 64
self.cpp_info.set_property("cmake_target_name", "TinyAD")
self.cpp_info.components["tinyad"].set_property("cmake_target_name", "TinyAD::TinyAD")

self.cpp_info.components["tinyad"].bindirs = []
self.cpp_info.components["tinyad"].libdirs = []
self.cpp_info.components["tinyad"].includedirs = [os.path.join(self.package_folder, "include")]
self.cpp_info.components["tinyad"].requires = ["eigen::eigen"]

Copy link
Contributor

@valgur valgur Jul 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.cpp_info.set_property("cmake_target_name", "TinyAD")
self.cpp_info.components["tinyad"].set_property("cmake_target_name", "TinyAD::TinyAD")
self.cpp_info.components["tinyad"].bindirs = []
self.cpp_info.components["tinyad"].libdirs = []
self.cpp_info.components["tinyad"].includedirs = [os.path.join(self.package_folder, "include")]
self.cpp_info.components["tinyad"].requires = ["eigen::eigen"]
self.cpp_info.set_property("cmake_target_name", "TinyAD")
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
if is_msvc(self):
# https://github.com/patr-schm/TinyAD/blob/29417031c185b6dc27b6d4b684550d844459b735/CMakeLists.txt#L35
self.cpp_info.cxxflags.append("/bigobj")

Creating a component is not really beneficial in any way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also add /bigobj to self.cpp_info.cxxflags for MSVC to match the CMake config in the project.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cmake_target_name should be TinyAD alone, as that is the one used in the upstream CMake.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. I adjusted my adjusted change accordingly.

@conan-center-bot

This comment has been minimized.

1 similar comment
@conan-center-bot

This comment has been minimized.

@jcar87 jcar87 self-assigned this Jul 18, 2024
@jjcasmar
Copy link
Contributor Author

jjcasmar commented Jul 18, 2024

Is the CI not working?

@AbrilRBS AbrilRBS assigned perseoGI and jcar87 and unassigned jcar87 Jul 19, 2024
@AbrilRBS
Copy link
Member

@jjcasmar we're under maintenance, the service should be available again soon, thanks for your patience :)

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@jjcasmar
Copy link
Contributor Author

Any update on this?

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 13 (306c2f0a167ea7a25c3d7fb826ff7248ae0e9839):

  • tinyad/cci.20240718:
    Built 5 packages out of 11 (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 13 (306c2f0a167ea7a25c3d7fb826ff7248ae0e9839):

  • tinyad/cci.20240718:
    Built 4 packages out of 5 (All logs)

Copy link
Contributor

@perseoGI perseoGI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally!

@conan-center-bot conan-center-bot merged commit 9879607 into conan-io:master Oct 1, 2024
9 checks passed
OMGtechy pushed a commit to OMGtechy/conan-center-index that referenced this pull request Dec 31, 2024
* Add TinyAD

* [TinyAD] Add bigobj for msvc

* fixes

* Fixes

* fix syntax error

---------

Co-authored-by: Luis Caro Campos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants