Fix configure & qmake compilation with a future MSVC version

When MSVC supports ref-qualified members, we need to ensure that
qstring_compat.cpp can see the non-qualified definitions in qstring.h,
which means no precompiled header.

Alternatively, for a bootstrapped build we could not compile
qstring_compat.cpp or #ifndef the functions.

Change-Id: I8ece34503060f0b4b0f8f2df2fb9b0fb1311e269
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Thiago Macieira 2013-12-13 16:43:43 -08:00 committed by The Qt Project
parent 8930839acb
commit 9c9f609313
4 changed files with 13 additions and 2 deletions

View File

@ -219,3 +219,7 @@ qmake_pch.obj:
{$(SOURCE_PATH)\tools\shared\windows}.cpp{}.obj::
$(CXX) $(CXXFLAGS) $<
# Make sure qstring_compat.obj isn't compiled with PCH enabled
qstring_compat.obj: $(SOURCE_PATH)\src\corelib\tools\qstring_compat.cpp
$(CXX) -c $(CXXFLAGS_BARE) $(SOURCE_PATH)\src\corelib\tools\qstring_compat.cpp

View File

@ -39,9 +39,8 @@
**
****************************************************************************/
#if defined(QSTRING_H) && !defined(QT_BOOTSTRAPPED)
#if defined(QSTRING_H)
# error "This file cannot be compiled with pre-compiled headers"
// (unless it's configure.exe, which is bootstrapped)
#endif
#define QT_COMPILING_QSTRING_COMPAT_CPP

View File

@ -118,6 +118,10 @@ configureapp.o: $(CONFSRC)/configureapp.h $(CONFSRC)/environment.h $(CONFSRC)/to
environment.o: $(CONFSRC)/environment.h
tools.o: $(CONFSRC)/tools.h
# Make sure qstring_compat.obj isn't compiled with PCH enabled
qstring_compat.o: $(CORESRC)/tools/qstring_compat.cpp
$(CXX) -c $(CXXFLAGS_BARE) -o $@ $<
clean:
-rm -f *.o
-rm -rf *.gch

View File

@ -163,3 +163,7 @@ quuid.obj: $(CORESRC)\plugin\quuid.cpp $(PCH)
$(CXX) -c $(CXXFLAGS) $<
{$(CORESRC)\xml}.cpp{}.obj::
$(CXX) -c $(CXXFLAGS) $<
# Make sure qstring_compat.obj isn't compiled with PCH enabled
qstring_compat.obj: $(CORESRC)\tools\qstring_compat.cpp
$(CXX) -c $(CXXFLAGS_BARE) $(CORESRC)\tools\qstring_compat.cpp