From c381df060f16a522e6edd3541b09af06c0aa3024 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 17 Apr 2019 15:03:58 +0200 Subject: Doc: Document QMAKE_[L|C[XX]]FLAGS_RELEASE_WITH_DEBUGINFO Fixes: QTBUG-17463 Change-Id: Ic2f0870da14db21b1da053716b6d63ba0ed679c9 Reviewed-by: Leena Miettinen --- qmake/doc/src/qmake-manual.qdoc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'qmake') diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 1e1b365141..a4c314b709 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1580,6 +1580,14 @@ The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \target QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO + \section1 QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO + + Specifies the C compiler flags for release builds where + \c{force_debug_info} is set in \c{CONFIG}. + The value of this variable is typically handled by + qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \target QMAKE_CFLAGS_SHLIB \section1 QMAKE_CFLAGS_SHLIB @@ -1648,6 +1656,14 @@ The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \target QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO + \section1 QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO + + Specifies the C++ compiler flags for release builds where + \c{force_debug_info} is set in \c{CONFIG}. + The value of this variable is typically handled by + qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \target QMAKE_CXXFLAGS_SHLIB \section1 QMAKE_CXXFLAGS_SHLIB @@ -2028,6 +2044,12 @@ The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \section1 QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO + + Specifies the linker flags for release builds where \c{force_debug_info} is + set in \c{CONFIG}. The value of this variable is typically handled by + qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \section1 QMAKE_LFLAGS_APP Specifies the linker flags for building applications. -- cgit v1.2.3 From de854aa37f49de6d8f6ee12c0e9d247c5143c2da Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 23 Apr 2019 09:54:46 +0200 Subject: Teach qmake MSVC's compiler options /std:c++[14|17|latest] This fixes the "could not parse compiler option" warning when generating VS project files. Fixes: QTBUG-75275 Change-Id: Idd98ae5fdb8ebf5a4e311cbb6cd3ed1daba74ca4 Reviewed-by: Kai Koehne --- qmake/generators/win32/msbuild_objectmodel.cpp | 2 ++ qmake/generators/win32/msvc_objectmodel.cpp | 8 ++++++++ qmake/generators/win32/msvc_objectmodel.h | 1 + 3 files changed, 11 insertions(+) (limited to 'qmake') diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index ad2976aa01..87cd560552 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -143,6 +143,7 @@ const char _InterfaceIdentifierFileName[] = "InterfaceIdentifierFileName"; const char _IntermediateDirectory[] = "IntermediateDirectory"; const char _KeyContainer[] = "KeyContainer"; const char _KeyFile[] = "KeyFile"; +const char _LanguageStandard[] = "LanguageStandard"; const char _LargeAddressAware[] = "LargeAddressAware"; const char _LinkDLL[] = "LinkDLL"; const char _LinkErrorReporting[] = "LinkErrorReporting"; @@ -1492,6 +1493,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool) << attrTagT(_IntrinsicFunctions, tool.EnableIntrinsicFunctions) << attrTagT(_MinimalRebuild, tool.MinimalRebuild) << attrTagT(_MultiProcessorCompilation, tool.MultiProcessorCompilation) + << attrTagS(_LanguageStandard, tool.LanguageStandard) << attrTagS(_ObjectFileName, tool.ObjectFile) << attrTagT(_OmitDefaultLibName, tool.OmitDefaultLibName) << attrTagT(_OmitFramePointers, tool.OmitFramePointers) diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 7335211f30..f08554d0f5 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -1146,6 +1146,14 @@ bool VCCLCompilerTool::parseOption(const char* option) ShowIncludes = _True; break; } + if (strlen(option) > 8 && second == 't' && third == 'd') { + const QString version = option + 8; + static const QStringList knownVersions = { "14", "17", "latest" }; + if (knownVersions.contains(version)) { + LanguageStandard = "stdcpp" + version; + break; + } + } found = false; break; case 'u': if (!second) diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index 41a6ffafa7..f6d1fc8023 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -526,6 +526,7 @@ public: triState ImproveFloatingPointConsistency; inlineExpansionOption InlineFunctionExpansion; triState KeepComments; + QString LanguageStandard; triState MinimalRebuild; QString ObjectFile; triState OmitDefaultLibName; -- cgit v1.2.3