The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15487 ====================================================================== Reported By: Gregor Jasny Assigned To: ====================================================================== Project: CMake Issue ID: 15487 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-04-01 12:21 EDT Last Modified: 2015-04-01 12:21 EDT ====================================================================== Summary: Leading double slashes in path cause unparsable Xcode project Description: If the project source path start with a double slash the resulting Xcode project cannot be parsed by Xcode.
I got the double slash at the beginning because my build orchestration script tries to normalize the source path by calling "pwd -P". So this: $ pwd /Volumes/Macintosh HD/Users/jasny/src/pathbug was translated into $ pwd -P //Users/jasny/src/pathbug and passed to cmake invocation. Multiple slashes are discussed here: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html#tag_04_11 A pathname consisting of a single slash shall resolve to the root directory of the process. A null pathname shall not be successfully resolved. A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. I thought about adding a kind of normalization which replaces multiple slashes with one but I'm unsure if this should be done globally or just in the Xcode generator. I will also file a bug report with Apple. Steps to Reproduce: project(Foo CXX) add_library(foo STATIC foo.cpp) cmake -GXcode //path/to/source open Foo.xcodeproj Result: Project /Users/jasny/src/pathbug/build/Foo.xcodeproj cannot be opened because the project file cannot be parsed. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-04-01 12:21 Gregor Jasny New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers