[cmake-developers] [CMake 0015487]: Leading double slashes in path cause unparsable Xcode project
Mantis Bug Tracker
mantis at public.kitware.com
Wed Apr 1 12:22:00 EDT 2015
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
======================================================================
More information about the cmake-developers
mailing list