-
Notifications
You must be signed in to change notification settings - Fork 92
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
cmake-ide-cmake-opts can't contain parameters with spaces #181
Comments
What's the use case for having a space in the option? |
In my case, there is CMake option that accepts multiple file names,
separated by a space.
…On 20/10/2018 19.07, Atila Neves wrote:
What's the use case for having a space in the option?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#181 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAcLoss297JPzTafF4anb6thJtWKmuoLks5um1hrgaJpZM4XWNHY>.
|
I looked at your original example again and Are you using an old version of |
I was using cmake-ide-20180713; I see the split-string-and-unquote only
in cide--split-command (which as I understand is not relevant for
cmake-ide-cmake-opts).
I actually started out with something like -DCONF_FILES=\"foo.conf
bar.conf\", but the only way I could actually get it to work is as
described above.
The actual example I'm working with is the Zephyr OS
(https://github.com/zephyrproject-rtos/zephyr), and my actual config is
(setq-local cmake-ide-cmake-opts '("-GNinja" "-DBOARD=nrf52840_pca10056"
"-DCONF_FILE=prj.conf overlay-bt.conf"))
Looking at Zephyr itself, I see in cmake/kconfig.cmake:
string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")
Maybe this is the reason why I don't just get a #define foo.conf.
…On 22/10/2018 14.11, Atila Neves wrote:
I looked at your original example again and |-DCONF_FILES=foo.conf
bar.conf| won't work at all with clang. It'll be just one |#define|
(foo.conf). I don't know about your CMake option but unless there are
quotes around the space-delimited list, that won't work either.
Are you using an old version of |cmake-ide|? It doesn't use
|split-string| but |split-string-and-unquote|. I explained the history
why in my comment on issue #177
<#177>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#181 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAcLoqsbHCxDGaDCGoPCxtCjYEwBO8Oeks5uncPygaJpZM4XWNHY>.
|
Sorry, I misread your issue. I now understand what you mean. The problem is that |
Due to the 'split-string' in
cide--run-cmake-impl
, it is not possible to have a space in a parameter incmake-ide-cmake-opts
(e.g. "-DCONF_FILES=foo.conf bar.conf").My workaround for the moment is to allow passing the parameters as lists:
Maybe this could be added to cmake-ide?
The text was updated successfully, but these errors were encountered: