mystor / rust-cpp

Embed C++ directly inside your rust code!
Apache License 2.0
795 stars 44 forks source link

Using cpp! macro in integration tests #100

Open Ayush1325 opened 2 years ago

Ayush1325 commented 2 years ago

Is there a way to use cpp! in integration tests? Currently, in the build script, we pass project root. However, integration tests don't get included in the library root and thus the cpp code is not generated. Calling build on integration test file separately does not work either. So is there any solution for this?

ogoffart commented 2 years ago

Calling build on integration test file separately does not work either.

Why doesn't that work?

I guess then what you need to do is to move such tests to a separate crate so the test can have their build script.