Files
qt-creator/src/plugins/cpptools/cpptools.qbs

247 lines
8.6 KiB
QML
Raw Normal View History

import qbs 1.0
import qbs.FileInfo
Project {
name: "CppTools"
QtcDevHeaders { }
QtcPlugin {
Depends { name: "Qt.widgets" }
Depends { name: "CPlusPlus" }
Depends { name: "Utils" }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "ProjectExplorer" }
Depends { name: "app_version_header" }
pluginTestDepends: [
"CppEditor",
"QmakeProjectManager",
]
Mute MSVC safety warnings Botan: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility:2227: warning: C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility:2212: see declaration of 'std::_Copy_impl' D:\dev\qt-creator\src\libs\3rdparty\botan\botan.cpp:7248: see reference to function template instantiation '_OutIt std::copy<const Botan::u32bit*,T*>(_InIt,_InIt,_OutIt)' being compiled with [ _OutIt=Botan::word *, T=Botan::word, _InIt=const Botan::u32bit * ] CppTools: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility:2873: warning: C4996: 'std::_Mismatch1': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility:2856: see declaration of 'std::_Mismatch1' D:\dev\qt-creator\src\plugins\cpptools\symbolfinder.cpp:388: see reference to function template instantiation 'std::pair<_Ty1,_Ty2> std::mismatch<QString::const_iterator,QString::const_iterator>(_InIt1,_InIt1,_InIt2)' being compiled with [ _Ty1=QString::const_iterator, _Ty2=QString::const_iterator, _InIt1=QString::const_iterator, _InIt2=QString::const_iterator ] Change-Id: I09a477e755c4555101b064271f10c08a69576e33 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-09-20 11:11:55 +02:00
cpp.defines: base
Properties {
condition: qbs.toolchain.contains("msvc")
cpp.defines: base.concat("_SCL_SECURE_NO_WARNINGS")
}
files: [
"abstracteditorsupport.cpp",
"abstracteditorsupport.h",
"baseeditordocumentparser.cpp",
"baseeditordocumentparser.h",
"baseeditordocumentprocessor.cpp",
"baseeditordocumentprocessor.h",
"builtineditordocumentparser.cpp",
"builtineditordocumentparser.h",
"builtineditordocumentprocessor.cpp",
"builtineditordocumentprocessor.h",
"builtinindexingsupport.cpp",
"builtinindexingsupport.h",
"builtincursorinfo.cpp",
"builtincursorinfo.h",
"clangbasechecks.ui",
"clangdiagnosticconfig.cpp",
"clangdiagnosticconfig.h",
"clangdiagnosticconfigsmodel.cpp",
"clangdiagnosticconfigsmodel.h",
"clangdiagnosticconfigswidget.cpp",
"clangdiagnosticconfigswidget.h",
"clangdiagnosticconfigswidget.ui",
"clazychecks.ui",
"compileroptionsbuilder.cpp",
"compileroptionsbuilder.h",
"cppcanonicalsymbol.cpp",
"cppcanonicalsymbol.h",
"cppchecksymbols.cpp",
"cppchecksymbols.h",
"cppclassesfilter.cpp",
"cppclassesfilter.h",
"cppcodeformatter.cpp",
"cppcodeformatter.h",
"cppcodemodelinspectordumper.cpp",
"cppcodemodelinspectordumper.h",
"cppcodemodelsettings.cpp",
"cppcodemodelsettings.h",
"cppcodemodelsettingspage.cpp",
"cppcodemodelsettingspage.h",
"cppcodemodelsettingspage.ui",
"cppcodestylepreferences.cpp",
"cppcodestylepreferences.h",
"cppcodestylepreferencesfactory.cpp",
"cppcodestylepreferencesfactory.h",
"cppcodestylesettings.cpp",
"cppcodestylesettings.h",
"cppcodestylesettingspage.cpp",
"cppcodestylesettingspage.h",
"cppcodestylesettingspage.ui",
"cppcompletionassist.cpp",
"cppcompletionassist.h",
"cppcompletionassistprocessor.cpp",
"cppcompletionassistprocessor.h",
"cppcompletionassistprovider.cpp",
"cppcompletionassistprovider.h",
"cppcursorinfo.h",
"cppcurrentdocumentfilter.cpp",
"cppcurrentdocumentfilter.h",
"cppdoxygen.cpp",
"cppdoxygen.h",
"cppeditoroutline.cpp",
"cppeditoroutline.h",
"cppeditorwidgetinterface.h",
"cppelementevaluator.cpp",
"cppelementevaluator.h",
"cppfileiterationorder.cpp",
"cppfileiterationorder.h",
"cppfilesettingspage.cpp",
"cppfilesettingspage.h",
"cppfilesettingspage.ui",
"cppfindreferences.cpp",
"cppfindreferences.h",
"cppfollowsymbolundercursor.cpp",
"cppfollowsymbolundercursor.h",
"cppfunctionsfilter.cpp",
"cppfunctionsfilter.h",
"cpphoverhandler.cpp",
"cpphoverhandler.h",
"cppincludesfilter.cpp",
"cppincludesfilter.h",
"cppindexingsupport.cpp",
"cppindexingsupport.h",
"cpplocalsymbols.cpp",
"cpplocalsymbols.h",
"cpplocatordata.cpp",
"cpplocatordata.h",
"cpplocatorfilter.cpp",
"cpplocatorfilter.h",
"cppmodelmanager.cpp",
"cppmodelmanager.h",
"cppmodelmanagersupport.cpp",
"cppmodelmanagersupport.h",
"cppmodelmanagersupportinternal.cpp",
"cppmodelmanagersupportinternal.h",
"cpppointerdeclarationformatter.cpp",
"cpppointerdeclarationformatter.h",
"cppprojectfile.cpp",
"cppprojectfile.h",
"cppprojectfilecategorizer.cpp",
"cppprojectfilecategorizer.h",
CppTools/ProjectManagers: Reduce ui blocking when loading projects ${AnyProject}::updateCppCodeModel() did two potentially not that cheap operations in the ui thread: (1) Querying the MimeDatabase for the mime type for the source files of the project. In 99.9% of the cases no files need to be read for this as the file extension will resolve the type. The expensiveness comes from the sheer number of files that can occur. (2) Calling compilers with the "(sub)project's compiler command line" to determine the macros. While the caches avoid redundant calls, the number of the unique compiler calls makes this still a ui-freezing experience. These two operations are moved into a worker thread. For this, the expensive compiler calls are encapsulated in thread safe lambdas ("runners") in order to keep the "mutexed" data minimal. The original API calls of the toolchains are implemented in terms of the runners. While adapting the project managers, remove also the calls to setProjectLanguage(). These are redundant because all of the project managers already set a proper value in the constructor. Also, currently there is no need (client) to report back detection of C sources in project parts. This also keeps CppProjectUpdater simple. There is still room for improvement: * Run the compiler calls in parallel instead of sequence. * Ensure that the mime type for a file is determined exactly once. Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-06 16:59:53 +01:00
"cppprojectinfogenerator.cpp",
"cppprojectinfogenerator.h",
"cppprojectpartchooser.cpp",
"cppprojectpartchooser.h",
CppTools/ProjectManagers: Reduce ui blocking when loading projects ${AnyProject}::updateCppCodeModel() did two potentially not that cheap operations in the ui thread: (1) Querying the MimeDatabase for the mime type for the source files of the project. In 99.9% of the cases no files need to be read for this as the file extension will resolve the type. The expensiveness comes from the sheer number of files that can occur. (2) Calling compilers with the "(sub)project's compiler command line" to determine the macros. While the caches avoid redundant calls, the number of the unique compiler calls makes this still a ui-freezing experience. These two operations are moved into a worker thread. For this, the expensive compiler calls are encapsulated in thread safe lambdas ("runners") in order to keep the "mutexed" data minimal. The original API calls of the toolchains are implemented in terms of the runners. While adapting the project managers, remove also the calls to setProjectLanguage(). These are redundant because all of the project managers already set a proper value in the constructor. Also, currently there is no need (client) to report back detection of C sources in project parts. This also keeps CppProjectUpdater simple. There is still room for improvement: * Run the compiler calls in parallel instead of sequence. * Ensure that the mime type for a file is determined exactly once. Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-06 16:59:53 +01:00
"cppprojectupdater.cpp",
"cppprojectupdater.h",
"cppqtstyleindenter.cpp",
"cppqtstyleindenter.h",
CppTools/ProjectManagers: Reduce ui blocking when loading projects ${AnyProject}::updateCppCodeModel() did two potentially not that cheap operations in the ui thread: (1) Querying the MimeDatabase for the mime type for the source files of the project. In 99.9% of the cases no files need to be read for this as the file extension will resolve the type. The expensiveness comes from the sheer number of files that can occur. (2) Calling compilers with the "(sub)project's compiler command line" to determine the macros. While the caches avoid redundant calls, the number of the unique compiler calls makes this still a ui-freezing experience. These two operations are moved into a worker thread. For this, the expensive compiler calls are encapsulated in thread safe lambdas ("runners") in order to keep the "mutexed" data minimal. The original API calls of the toolchains are implemented in terms of the runners. While adapting the project managers, remove also the calls to setProjectLanguage(). These are redundant because all of the project managers already set a proper value in the constructor. Also, currently there is no need (client) to report back detection of C sources in project parts. This also keeps CppProjectUpdater simple. There is still room for improvement: * Run the compiler calls in parallel instead of sequence. * Ensure that the mime type for a file is determined exactly once. Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-06 16:59:53 +01:00
"cpprawprojectpart.cpp",
"cpprawprojectpart.h",
"cpprefactoringchanges.cpp",
"cpprefactoringchanges.h",
"cpprefactoringengine.cpp",
"cpprefactoringengine.h",
"cppselectionchanger.cpp",
"cppselectionchanger.h",
"cppsemanticinfo.h",
"cppsemanticinfoupdater.cpp",
"cppsemanticinfoupdater.h",
"cppsourceprocessor.cpp",
"cppsourceprocessor.h",
"cpptools.qrc",
"cpptools_global.h",
"cpptools_utils.h",
"cpptoolsbridge.cpp",
"cpptoolsbridge.h",
"cpptoolsbridgeinterface.h",
"cpptoolsbridgeqtcreatorimplementation.cpp",
"cpptoolsbridgeqtcreatorimplementation.h",
"cpptoolsconstants.h",
"cpptoolsjsextension.cpp",
"cpptoolsjsextension.h",
"cpptoolsplugin.cpp",
"cpptoolsplugin.h",
"cpptoolsreuse.cpp",
"cpptoolsreuse.h",
"cpptoolssettings.cpp",
"cpptoolssettings.h",
"cppvirtualfunctionassistprovider.cpp",
"cppvirtualfunctionassistprovider.h",
"cppvirtualfunctionproposalitem.cpp",
"cppvirtualfunctionproposalitem.h",
"cppworkingcopy.cpp",
"cppworkingcopy.h",
"cursorineditor.h",
"doxygengenerator.cpp",
"doxygengenerator.h",
"editordocumenthandle.cpp",
"editordocumenthandle.h",
"followsymbolinterface.h",
"functionutils.cpp",
"functionutils.h",
"generatedcodemodelsupport.cpp",
"generatedcodemodelsupport.h",
"includeutils.cpp",
"includeutils.h",
"indexitem.cpp",
"indexitem.h",
"insertionpointlocator.cpp",
"insertionpointlocator.h",
"wrappablelineedit.cpp",
"wrappablelineedit.h",
"projectinfo.cpp",
"projectinfo.h",
"projectpart.cpp",
"projectpart.h",
"projectpartheaderpath.h",
"searchsymbols.cpp",
"searchsymbols.h",
"semantichighlighter.cpp",
"semantichighlighter.h",
"senddocumenttracker.cpp",
"senddocumenttracker.h",
"stringtable.cpp",
"stringtable.h",
"symbolfinder.cpp",
"symbolfinder.h",
"symbolsfindfilter.cpp",
"symbolsfindfilter.h",
"tidychecks.ui",
"typehierarchybuilder.cpp",
"typehierarchybuilder.h",
"usages.h"
]
Group {
name: "Tests"
condition: qtc.testsEnabled
files: [
"cppcodegen_test.cpp",
"cppcompletion_test.cpp",
"cppheadersource_test.cpp",
"cpplocalsymbols_test.cpp",
"cpplocatorfilter_test.cpp",
"cppmodelmanager_test.cpp",
"cpppointerdeclarationformatter_test.cpp",
"cppsourceprocessertesthelper.cpp",
"cppsourceprocessertesthelper.h",
"cppsourceprocessor_test.cpp",
"cpptoolstestcase.cpp",
"cpptoolstestcase.h",
"modelmanagertesthelper.cpp",
"modelmanagertesthelper.h",
"symbolsearcher_test.cpp",
"typehierarchybuilder_test.cpp",
]
cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"'])
}
Export {
Depends { name: "CPlusPlus" }
Depends { name: "Qt.concurrent" }
}
}
}