Clarabel.cpp icon indicating copy to clipboard operation
Clarabel.cpp copied to clipboard

Ninja missing byproducts on clean build

Open codeinred opened this issue 1 year ago • 0 comments

If you download the repository fresh, and attempt to build with Ninja, the build fails with the following error:

ninja: error: '/Users/alecto/3rd/Clarabel.cpp/rust_wrapper/target/debug/libclarabel_c.dylib', needed by 'examples/c/example_expcone', missing and no known rule to make it

This is because Ninja can't find libclarabel_c.a/libclarabel_c.dylib, and the libclarabel_c custom target doesn't inform Ninja that it produces these libraries.

This can be handled by adding LIBCLARABEL_C_SHARED_PATH and LIBCLARABEL_C_STATIC_PATH as byproducts of the call to add_custom_target

codeinred avatar Jun 06 '24 18:06 codeinred