open-research / sumatra

http://neuralensemble.org/sumatra/
BSD 2-Clause "Simplified" License
127 stars 48 forks source link

Improve support for compiled languages #358

Open Psirus opened 7 years ago

Psirus commented 7 years ago

The support for compiled languages should be better. Or maybe I'm not using sumatra right. Currently, what I do is build my executable using CMake, and it is created in build/. Then I call sumatra like so

smt run --executable=$(pwd)/build/MyExecutable parameters.json

This works, but a) I don't get any dependency information, i.e. which version of library xy was used to compile MyExecutable. Is there any way I could add this information? And b) I would like to avoid having to use $(pwd). Using relative paths as --executable=build/MyExecutable should works as well.

My folder looks like this:

├── build
├── CMakeLists.txt
├── Data
├── src/MyExecutable.cpp
├── .git
├── .smt
└── parameters.json

Could you give me a hint on how to using sumatra properly with such a setup?

apdavison commented 7 years ago

I agree that the support for compiled languages is rather limited at present.

What should work is to run CMake with smt, e.g.

smt run --executable=cmake

The executable should then at least be tracked as an output of this step.

Can you let me know if this works?

The next steps would be (i) to link the cmake and MyExecutable steps more explicitly (see #107), (ii) to implement dependency tracking for C++ code (no ticket for this at present; any suggestions for implementation welcome - also see #360).