Skip to content
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

Auto-include / auto-exec on cling startup #230

Open
326623 opened this issue Apr 17, 2018 · 6 comments · May be fixed by #401
Open

Auto-include / auto-exec on cling startup #230

326623 opened this issue Apr 17, 2018 · 6 comments · May be fixed by #401

Comments

@326623
Copy link

@326623 326623 commented Apr 17, 2018

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!

@Axel-Naumann
Copy link
Member

@Axel-Naumann Axel-Naumann commented Jun 12, 2018

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.

@Axel-Naumann Axel-Naumann changed the title Some Feature request on cmake scripts Auto-include / auto-exec on cling startup Jun 12, 2018
@sudo-panda
Copy link
Contributor

@sudo-panda sudo-panda commented Mar 16, 2021

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?

@Axel-Naumann
Copy link
Member

@Axel-Naumann Axel-Naumann commented Mar 16, 2021

We can learn from other tools, such as where gdb searches for .gdb_init - that seems like a good start.

@sudo-panda
Copy link
Contributor

@sudo-panda sudo-panda commented Mar 17, 2021

Will .cling_init be a C/C++ file or do we add support for cling commands too?

@sudo-panda sudo-panda linked a pull request Mar 18, 2021 that will close this issue
@Axel-Naumann
Copy link
Member

@Axel-Naumann Axel-Naumann commented Mar 18, 2021

I'd say we should support cling commands, too - this isn't a header but should contain prompt input.

@sudo-panda
Copy link
Contributor

@sudo-panda sudo-panda commented Mar 18, 2021

@Axel-Naumann my current PR supports cling commands, could you please review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants