Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.1, 5.3.0
-
None
-
Arch Linux x64, GCC 4.8.2, Clang 3.4
MacOS X 10.8 Apple LLVM 5.0 (based on LLVM 3.3svn)
-
e3a7237d8214bb229997730775fd89d06b9db269
Description
Using precompiled headers on a project, which has a space in its target name, qmake escapes the spaces with "/\ " instead of "\ " for checking and creating the directory for the PCH.
I tested Qt 5.2.1 (cherry-picked e20147d1d0cb02cae1424ae779b8392399fa8b24) and the current stable branch.
Qt 4.8.5 correctly escapes the path.
The following errors are emitted:
Clang
error: unable to open output file 'Name with spaces/c++.pch': 'Error opening output file 'Name with spaces/c++.pch': No such file or directory'
GCC
/usr/include/stdc-predef.h:1:0: fatal error: can't create precompiled header Name with spaces.gch/c++: No such file or directory
See line 3:
Qt 5
Name\ with\ spaces/c++.pch: stable.h ../qt/5.3.0/lib/QtCore.framework/Versions/5/Headers/QVariant \ ../qt/5.3.0/lib/QtCore.framework/Versions/5/Headers/qvariant.h @test -d Name/\ with/\ spaces/ || mkdir -p Name/\ with/\ spaces/ $(CXX) $(CXXFLAGS) $(INCPATH) -x c++-header -c stable.h -o Name\ with\ spaces/c++.pch
Qt 4
Name\ with\ spaces/c++.pch: stable.h @$(CHK_DIR_EXISTS) Name\ with\ spaces/ || $(MKDIR) Name\ with\ spaces/ $(CXX) $(CXXFLAGS) $(INCPATH) -x c++-header -c stable.h -o Name\ with\ spaces/c++.pch
I also added a small program, to demonstrate the problem.