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

Ninja build broken when using commands with $-escaped characters #240

Closed
claudiofantacci opened this issue Mar 28, 2019 · 2 comments
Closed

Comments

@claudiofantacci
Copy link
Collaborator

claudiofantacci commented Mar 28, 2019

ninja build is broken with following error:
ninja: error: build.ninja:244: bad $-escape (literal $ must be written as $$)

The problem is the --switch $(COLOR) generated by CMake for the custom command in AddUninstallTarget and YCMEPHelper. Here is the list of such commands:

❯ git grep "(COLOR" ..
../modules/AddUninstallTarget.cmake:                  COMMAND "${CMAKE_COMMAND}" -E cmake_echo_color --switch=$\(COLOR\) --cyan "Uninstall the project..."
../modules/YCMEPHelper.cmake:                             COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --switch=$(COLOR) --cyan "Working directory: ${source_dir}"
../modules/YCMEPHelper.cmake:    set(_source_cmd COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --switch=$(COLOR) --cyan "${_name} SOURCE directory: "
../modules/YCMEPHelper.cmake:    set(_source_cmd COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --switch=$(COLOR) --cyan "${_name} REPOSITORY directory: "
../modules/YCMEPHelper.cmake:                    COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --switch=$(COLOR) --cyan "${_name} SOURCE directory: "
../modules/YCMEPHelper.cmake:  set(_binary_cmd COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --switch=$(COLOR) --cyan "${_name} BINARY directory: "

Possible solutions:

  1. Remove them
  2. use $$\(COLOR\)
  3. use $\{COLOR\}

Related issue robotology/robotology-superbuild#83

@claudiofantacci
Copy link
Collaborator Author

cc @diegoferigo

@drdanz
Copy link
Member

drdanz commented Mar 28, 2019

Should be fixed in f2c61b1

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

No branches or pull requests

2 participants