cling
cling copied to clipboard
Auto-include / auto-exec on cling startup
Scenario: I have a project, with build tools of cmake, when I try to run it with cling. It prompts some headers are not included.
So I was wondering if there is a way to make use of the cmake script to load the build environment into cling and run directly?
Appreciate the great work!
C++ modules might help. Or create a header that includes your files, and include that at startup. We don't have a cling_logon.C
mechanism yet (we have that for ROOT) - I'd be happy to receive a PR for that. If found, that file would be "run" at startup. Maybe with cling_logon.h
being included at startup.
I would like to work on this issue.
I have a doubt. Where will cling look for the file during startup? Will it be in the current working directory, a specific directory for cling, or in the PATH?
We can learn from other tools, such as where gdb
searches for .gdb_init
- that seems like a good start.
Will .cling_init
be a C/C++ file or do we add support for cling commands too?
I'd say we should support cling commands, too - this isn't a header but should contain prompt input.
@Axel-Naumann my current PR supports cling commands, could you please review it.