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

Support for passing to CMake any random string #27

Closed
lilianmoraru opened this issue Apr 8, 2017 · 5 comments
Closed

Support for passing to CMake any random string #27

lilianmoraru opened this issue Apr 8, 2017 · 5 comments

Comments

@lilianmoraru
Copy link

Currently, the crate limits the user on what kind of options he can pass to CMake.
I am trying to pass -C path/to/a/cmake/script.cmake(it's a script that speeds-up build-times, I use it for all cmake projects) and it is just impossible to do that with the current API.
I think there should be an option where the user can pass flags himself, whatever he wants.

@alexcrichton
Copy link
Member

Seems reasonable to me! Would you be interested in sending a PR?

@lilianmoraru
Copy link
Author

I could do that.
What do you think would be the appropriate naming for these functions?
I am thinking(inspired by std::process::Command) of: cmake_arg/cmake_args or arg/args?
At least for me, arg/args seems too ambiguous.

@alexcrichton
Copy link
Member

Yeah cmake_arg and cmake_args sounds good to me!

@tomjakubowski
Copy link

tomjakubowski commented Oct 16, 2024

I think that this use-case is covered by either configure_arg() or build_arg(), where configure_arg() passes arguments before the -- and build_arg() passes arguments after, like so:

cmake <configure_arg1> <configure_arg2> ... -- <build_arg1> <build_arg2>...

In particular, I am able to use config.configure_arg("-C /path/to/some/file.cmake") for OP's use case.

@lilianmoraru
Copy link
Author

Very nice of me suggesting I am committing to implement it and then not doing it.

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

No branches or pull requests

3 participants