summaryrefslogtreecommitdiff
path: root/src/plugins/cmakeprojectmanager/servermodereader.h
Commit message (Collapse)AuthorAgeFilesLines
* server-mode: Always try to read CMakeCache, even after errorTobias Hunger2018-05-221-0/+4
| | | | | Change-Id: Ib3d4fb5ac14340a7f706e4a1d8a0cbdc420d01d1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Use FolderNode::addNestedNodes for unique_ptr in server-modeTobias Hunger2018-05-041-2/+2
| | | | | | | | Remove FolderNode::addNestedNodes that take raw pointers now that the last user is gone. Change-Id: If2ca3864934d9239ac136e65c0b7dbcea7caf220 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Fix project parsing notificationTobias Hunger2017-10-061-10/+8
| | | | | | | | | This builds on top of 08677c0b014cc44d944e32d462f502a67c948404 and fixes one more code path to go through a common entry/exit point. Change-Id: I1d00fa9242f247028e5d3b0ef3b5fe1d3f4cb03d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMakeProjectManager: Clean forward declarationLaurent Montel2017-09-271-1/+0
| | | | | Change-Id: I47cb6fbac276554e548383fe6945fd5cd38386c6 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Convert macros from plain QByteArray to a vector of structsMarco Bubke2017-09-141-1/+1
| | | | | | | | | | | The old code model expected the macros as C++ formatted text ("#define Foo 42) but newer targets like the Clang codemodel expect key value arguments like "-DFoo=42". So instead of parsing the text again and again we use an abstract data description. Task-number: QTCREATORBUG-17915 Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-07-251-0/+8
|\ | | | | | | | | | | | | Conflicts: qtcreator.pri Change-Id: If5f4a9821a23ac0df81eb84b3980f9cf7ecd70ba
| * CMake: Fix progress calculation in server-modeTobias Hunger2017-07-251-0/+8
| | | | | | | | | | | | | | | | | | Add unit test to make sure this stays fixed. Task-number: QTCREATORBUG-18624 Change-Id: Ieeb41982418481223d9ebf8f5c6ec4b3b78bfe00 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | CMake: Extract crossReferences data of targets in server-modeTobias Hunger2017-07-211-1/+25
|/ | | | | | | | Use the information to add a filenode below a target that takes you directly to the target definition. Change-Id: Ifcb8e2c4f085110033019ea3816c79f5b8630472 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Report more cmake errors in server modeTobias Hunger2017-06-201-0/+3
| | | | | | | | | Handle more kinds of errors in CMake server-mode. Task-number: QTCREATORBUG-18318 Change-Id: I43fff7f3cfbd86d01ff05a0936261b8d91aa5d70 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Fix up file group information in server-modeTobias Hunger2017-04-251-0/+2
| | | | | | | | | | | | | | | | | Server-mode reports a filegroup for all the listed headers and will provide that without any information on the files (no language, include paths, etc.). Fix up file groups like these by using the best (with that being the settings that effect the most other files) possible information for these files. CMake has no idea what headers are, so it has no way to provide any better information, so Creator has to fix things up again:-/ Task-number: QTCREATORBUG-17971 Change-Id: Ib5ddab23cf725c7e03717b577cc9f9edc5bbfc61 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Deduplicate targets in server-modeTobias Hunger2017-04-071-2/+2
| | | | | | | | | | | | | CMake server-mode does report targets for each "PROJECT" that was encountered before the target was defined. So it reports several copies of the same data all the time. Deduplicate that information. This fixes files being duplicated in the code model and the project tree. Task-number: QTCREATORBUG-17955 Change-Id: I95daa0f48e37587234d7e04e9bed6d20884f8be0 Reviewed-by: hjk <hjk@qt.io>
* CMake: Move headers into their own folder in server-modeTobias Hunger2017-03-291-5/+8
| | | | | | | | | | Move all project headers into one folder. This reduces the time it takes to generate the project tree, since the headers will only show up once now (instead of once per target), severly reducing the number of nodes in the tree. Change-Id: Ibcfa7c02c1aec4a98054f4f8a97b69dfb4c25ae4 Reviewed-by: hjk <hjk@qt.io>
* CMake: Speed up server-mode readerTobias Hunger2017-03-271-3/+6
| | | | | | | | This patch reduces the time to generate a project tree by 15% in my test project. Change-Id: Ie5956cdd2108873118654857dc299bdb0b6d3636 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Use a CMakeProjectNode as top level cmake nodeTobias Hunger2017-03-151-4/+6
| | | | | Change-Id: I6e68b971cf490b9b064a2866bd99865a7f4a7bd9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: forward dirty signal in server-modeTobias Hunger2017-03-131-0/+1
| | | | | | | This fixes auto-running cmake on changes to the project files. Change-Id: I652b48b243b5decb6927b1619c47527af83d7f03 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CppTools/ProjectManagers: Reduce ui blocking when loading projectsNikolai Kosjar2017-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ${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>
* CMakeProjectManager: Simplify creation of virtual foldershjk2017-01-271-9/+9
| | | | | Change-Id: I781c0f6551ca01feaf1cc0fc1148a151777f91bf Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMakeProject: Remove a few unneded declarationshjk2017-01-261-9/+0
| | | | | Change-Id: Ida5afcfb502756c45b58ab6600b2ff98329139dc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMakeProject: Simplify tree generation helper functionhjk2017-01-261-8/+5
| | | | | | | The sets of used nodes are not needed anymore. Change-Id: I308fa140779f8a108fa23907f0959cf35100d67f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Utils: Introduce a TemporaryDirectory and TemporaryFile classTobias Hunger2017-01-201-1/+0
| | | | | | | | Both wrap the corresponding Qt class, but make sure all temporary files or directories are created inside a "master temporary directory". Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Fix WS in servermode readerTobias Hunger2016-12-211-1/+1
| | | | | Change-Id: I797d3c7025ee43f722ed137d911c58acb4b8e1f0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake: Pass const QList<const FileNode *> to Directory ReadersTobias Hunger2016-12-211-4/+5
| | | | | | | | This makes sure they need to copy whatever they need. Change-Id: I767ac0c5f54ca1f9f46acdefe4bd7fea35657312 Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Cache cmake configuration only onceTobias Hunger2016-12-021-1/+1
| | | | | | | | | | This fixes saves memory and fixes some update issues with the cmake configuration, where the three layers of caches used to interfere with each other. Task-number: QTCREATORBUG-17360 Change-Id: I5564bbe46ca8de6b38dd710100bfc18fad98eac5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Cache buildtargets in builddirmanagerTobias Hunger2016-11-301-1/+1
| | | | | | | | | No need to have the builddirreaders to so. Change-Id: Ia7e38f6483b29d6a4f4b65baacc17bf184a3cb34 Task-number: QTCREATORBUG-17359 Reviewed-by: Florian Apolloner <florian@apolloner.eu> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Initialize int members of servermodereaderTobias Hunger2016-11-291-2/+2
| | | | | Change-Id: Id7262d4c7f96f56aa95925852d64d9856292fb1e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Fix server-mode trimming out targets every second timeTobias Hunger2016-11-151-5/+5
| | | | | | | Do not trim out targets every second time the project tree is generated. Change-Id: I6ed9cd7bb6b2e88ec6dbe063f90719ffacffdd61 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Project tree for server mode dataTobias Hunger2016-11-141-1/+15
| | | | | Change-Id: Ief884a76c1b4211501dd6515b17b6e88a8e881e5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Pass scanned files on to builddirreadersTobias Hunger2016-11-141-1/+1
| | | | | Change-Id: I226aeafe6800a84fe4bbf8cf6fd21b8237575a88 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Make future-handling in ServerModeReader more robustTobias Hunger2016-11-071-1/+1
| | | | | Change-Id: Id2fc5487fdfb7619db2eee2439e5636afdc39add Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake: Implement a reader that interacts with CMake server modeTobias Hunger2016-10-311-0/+141
Implement a reader that interacts with CMake server mode to retrieve its data. Change-Id: I4146a648475c2c5811b8a08126f10ff3b99e79f5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>