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

Handle windows paths nicely for cmake #35

Closed
wants to merge 1 commit into from

Conversation

stonier
Copy link
Contributor

@stonier stonier commented Mar 9, 2013

Make sure paths handed off to cmake (in this case catkin/cmake/em/order_packages.cmake.em) are given proper cmake paths (always forward slashes), otherwise cmake falls over trying to parse invalid escape sequences and you get the error of the kind below.

-- Using CATKIN_TEST_RESULTS_DIR: C:/work/ws/build/test_results
-- catkin 0.5.64
-- BUILD_SHARED_LIBS is on
CMake Error at C:/work/ws/build/catkin_generated/order_packages.cmake:58 (set):
  Syntax error in cmake code at

    C:/work/ws/build/catkin_generated/order_packages.cmake:58

  when parsing string

    C:\Python27\lib\site-packages\catkin_pkg\templates\groovy\metapackage.cmake.in

  Invalid escape sequence \P
Call Stack (most recent call first):
  catkin/cmake/catkin_workspace.cmake:35 (include)
  CMakeLists.txt:51 (catkin_workspace)


-- Configuring incomplete, errors occurred!

@wjwwood
Copy link
Contributor

wjwwood commented Mar 11, 2013

The slashes are correct for Windows, but CMake is falling over on the back slashes.

This is probably not the correct place to fix this, because this function should just return a path, if we need to convert the backslashes to forward slashes for CMake somewhere then we should do it there, not before returning the path.

@dirk-thomas is going to reproduce and find the appropriate place to fix this.

@stonier
Copy link
Contributor Author

stonier commented Mar 12, 2013

Works here - great.

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

Successfully merging this pull request may close these issues.

None yet

3 participants