-
Notifications
You must be signed in to change notification settings - Fork 12
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 support for usage of Clarabel.cpp via add_subdirectory
#46
Comments
codeinred
added a commit
to codeinred/Clarabel.cpp
that referenced
this issue
Jun 6, 2024
This commit allows Clarabel.cpp to be consumed by other CMake projects via a call to `add_subdirectory`: ```cmake add_subdirectory(path/to/clarabel.cpp) ``` Other projects might have Clarabel.cpp as a git submodule, and this makes it easier to do so.
goulart-paul
added a commit
that referenced
this issue
Feb 2, 2025
* fix issue #44 - eigen requires at least c++14 support * fix issue #45 - specify byproducts Build fails if ninja isn't aware of the byproducts for libclarabel_c * fix issue #46 - support use via `add_subdirectory` This commit allows Clarabel.cpp to be consumed by other CMake projects via a call to `add_subdirectory`: ```cmake add_subdirectory(path/to/clarabel.cpp) ``` Other projects might have Clarabel.cpp as a git submodule, and this makes it easier to do so. * Remove unncessary <iostream> include Including iostream means introducing the static (global) constructors and destructors for std::cin, std::cerr, and std::cout. That extra init and fini code is undesirable when those streams are not actually used. * bump version * fixes #48 * fixes #49 * fix v1.84 clippys * fixes #43 * update submodule * add max_threads * v0.10 build fixes --------- Co-authored-by: Alecto Irene Perez <[email protected]> Co-authored-by: Jeremy Nimmer <[email protected]>
With apologies for the long delay : thank you for these, which are now in v0.10.0. |
goulart-paul
pushed a commit
that referenced
this issue
Feb 2, 2025
* fix issue #44 - eigen requires at least c++14 support * fix issue #45 - specify byproducts Build fails if ninja isn't aware of the byproducts for libclarabel_c * fix issue #46 - support use via `add_subdirectory` This commit allows Clarabel.cpp to be consumed by other CMake projects via a call to `add_subdirectory`: ```cmake add_subdirectory(path/to/clarabel.cpp) ``` Other projects might have Clarabel.cpp as a git submodule, and this makes it easier to do so.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A common pattern is to have C++ dependencies provisioned via git submodule. These dependencies can then be included via
add_subdirectory
, however this fails with Clarabel.cpp because Clarabel.cpp expects to be the top-level project:If Clarabel.cpp is not the top-level project, it will fail to build, because directories like
rust_wrapper
won't be found.The text was updated successfully, but these errors were encountered: