aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Do not leak the build graph locker if project resolving is cancelledv1.7.1Christian Kandeler2017-01-051-2/+4
| | | | | | Task-number: QTCREATORBUG-17543 Change-Id: Ie32f5e9729dc98705b0d0d27839d9544ffd29a43 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Check the type of the top-level itemChristian Kandeler2017-01-054-3/+21
| | | | | | | | We neglected to do that so far. If a project's top-level item was not Project or Product, an internal error would be thrown. Change-Id: I7f4ca74107a6bcc990d21f998ae6c5b9732bfb28 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove unused functionJake Petroules2016-12-221-14/+0
| | | | | | | | This amends 532e8ea991cf0dede72d3f357619f49f4b36187b, which removed the restriction that two build configurations must use different profiles. Change-Id: Ie9536c33baa621180e398937b24132da3758e85b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix qbs-setup-toolchains with concretely specified MSVCJoerg Bornemann2016-12-212-1/+2
| | | | | | | | | | We must call init() on every MSVC object. Also, MSVC::clPath must point to the directory where cl is. This amends commit fb2cf69d. Task-number: QBS-1084 Change-Id: Iaa8b3f6a5a0b88b998c2da31d9056f22a511d05d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ModuleLoader: Do not cache Probes that throw errorsChristian Kandeler2016-12-201-6/+6
| | | | | | | | | Doing so can hide errors, for instance when such a Probe is first run by a non-required module instance. Task-number: QBS-1074 Change-Id: Ibfbba029761b7d09d0a02eeaf5aa01f76c701574 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do the buildgraph sanity checks only on demandChristian Kandeler2016-12-191-10/+1
| | | | | | | This procedure is too slow to enable by default even in debug builds. Change-Id: Ib77bba191841d3d50fbf5be482021b71dfa19e08 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* VS generator: Don't prepend $(ProjectDir) to absolute pathsThomas Epting2016-12-181-2/+6
| | | | | | Task-number: QBS-1081 Change-Id: I62f2016f87d0186eea6f8c7e3e784ab28f72f981 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* VS generator: Add missing trailing backslash to OutDir variableThomas Epting2016-12-181-1/+3
| | | | | | Task-number: QBS-1080 Change-Id: I1b390dd31d10675f0e1f4fe3abdee2980909724d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* EvaluatorScriptClass: Catch exceptions from script importing codeChristian Kandeler2016-12-161-4/+26
| | | | | Change-Id: I435a3610f0b5eed9eabb012592ef13f36f8c68cc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix unnecessary output noise and absolute path assertions in testsJake Petroules2016-12-121-0/+2
| | | | | Change-Id: I59e7efa8d91ade54582cfffb39226724e22a4f69 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Include information on cost of storing the build graph when profilingChristian Kandeler2016-12-091-0/+1
| | | | | Change-Id: I445c0202178906dc6f8b04ff6f8e94f31fc705c4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix passing -arch x86_64h or -arch armv7 to Clang for Apple targetsJake Petroules2016-12-094-1/+53
| | | | | | | | | | This fixes a regression `clang: error: invalid arch name '-arch armv7a'` when building for iOS armv7, which affects Qt Creator in particular. Expand the scope of the deploymentTarget autotest to verify it does not happen again. Change-Id: Ic2689ec4474f74642d3de641b57a52854d2a8bdc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix unused variable warningJake Petroules2016-12-071-0/+1
| | | | | Change-Id: I033c2e4b68dc29d06dec88d640c2bfc530627a03 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix language tests on WindowsChristian Kandeler2016-12-071-1/+1
| | | | | | | FileInfo::exists() requires clean paths now. Change-Id: I40eb3273bd0a67174cc7e91c544e5e6cfb954890 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix usage of restored ProbesChristian Kandeler2016-12-072-2/+4
| | | | | | | | We have to set these up per actual product, not per product name. The latter is not taking profile multiplexing into account. Change-Id: I359c7316f106b756aaee74a5f4b7050fbc4e2bf3 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Emit deprecation warnings for relative paths in certain contextsChristian Kandeler2016-12-062-0/+30
| | | | | | | | | Namely, for those in groups not located in the same directory as the product. We will change the base directory to a more sensible one in 1.8, and this patch gives users the chance to adapt in advance. Change-Id: I3a470b7f0664dc399633292d3f026f9636ca7aad Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* ModuleLoader: No warnings for module properties in Artifact itemsChristian Kandeler2016-12-061-0/+4
| | | | | | | | These are "special" due to QBS-1030 and must be ignored for now. Task-number: QBS-1058 Change-Id: I5a405ea035446c8d0c074f51bdde6bda78b3f8f1 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Set default QBS_INSTALL_PREFIX to /usr/local only on unixOrgad Shaneh2016-12-061-1/+1
| | | | | | | On Windows it should just be root. Change-Id: Ibc48b4aec6121ce03a8f2e6f60700e55b360acb6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Make Win32 API usage long-path awareJake Petroules2016-12-053-4/+16
| | | | | | | | | | | | | | | | | | | | | | Most Win32 API functions are limited to working with paths which are up to MAX_PATH (260) characters long by default. Windows 10 version 1607 allows this limit to be exceeded by setting a LongPathsEnabled registry key and manifesting the application with the longPathAware=true setting. We cannot rely on this being the case since we support older Windows versions and the registry key is set to off by default. Fortunately, most Win32 API functions allow prepending the \\?\ prefix which raises the path length limit to UNICODE_STRING_MAX_CHARS (32767) characters. This works on all Windows versions. For the FileInfo class in particular, this resolves potential false negatives for file existence, inability to retrieve modification times, and misidentification of directories as files. Task-number: QBS-1068 Change-Id: Ia4a37fa75ede803e3e2ecb63ae1ab12d2dae33bd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* macOS: Move foreground transformation code later in the lifetime cycleJake Petroules2016-12-052-9/+13
| | | | | | | | | This corrects an issue where the user sometimes needed to set focus on a different application and then back to qbs-config-ui in order to access the menu bar. Change-Id: Idecddd99e477cbee29a2e7d4aa16aeaf428757f0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix warning on UnixChristian Kandeler2016-12-021-4/+2
| | | | | Change-Id: Ibe366f16cb3258877ec23eb2aadd139dbda9f47c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add VS 2017 supportJoerg Bornemann2016-12-026-42/+132
| | | | | | Task-number: QBS-1025 Change-Id: Ib08373b6b45fa0b728e68466d08d43a14f864d72 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ModuleLoader: Check the names of PropertyOptions itemsChristian Kandeler2016-12-024-0/+21
| | | | | | | | | We must uphold the invariant that all property declarations refer to properties that actually exist. Task-number: QBS-1065 Change-Id: I3f6f4af2837b086c3afff33bed37bb79fda972a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Simplify determination of MSVC compiler definesJoerg Bornemann2016-12-021-57/+29
| | | | | | | | | | | Do not compile a helper program to output a specific environment variable. Use cmd.exe as compiler backend and pipe commands to it. This accelerates the whole stunt, and removes the need for determining the location of a host compiler. It might be that there is none installed. Change-Id: I1847feadada42ea009aafc730815207edf7e7ff0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Change the default value and behavior of Qt.core.resourceSourceBaseDenis Klychkov2016-12-021-3/+4
| | | | | | | | | | | | | | | | | | | The default value "undefined" tells the qrc file generator to use only the input file name as a resource alias. The benefits of changing the default value are as follows: 1) It's a bit weird to reset a normal value to undefined in qbs code. 2) This simplifies feature usage for output Artifacts and single files. 3) If one wants to put a hierarchical structure into a qrc file there are a lot of cases in which they have to specify resourceSourceBase manually. 4) When a Group with a wildcard and a prefix is used this makes user's intention a bit clearer. This strongly separates "I want this set of files" from "I want this directory structure". Task-number: QBS-1053 Change-Id: Ib6413643398dca475b4b71ad884202c9e7fb823a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add possibility to specify the base name of the generated qrc fileDenis Klychkov2016-12-021-1/+4
| | | | | | | Task-number: QBS-1043 Change-Id: I5f537f148792b0e2647d08d6e8004d79ae402f07 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove version checks on macOSJake Petroules2016-11-301-62/+24
| | | | | | | | | The Qbs build requirement, Qt 5.4, requires macOS 10.7 so none of these code paths are ever exercised. As a bonus, this fixes a deprecation warning. Change-Id: Ib7ae2973ca18aa4bb2e7e781a271c01ae613f0f5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix change tracking for module properties requested from artifactsChristian Kandeler2016-11-308-6/+37
| | | | | | | | | | ... in commands. For some strange reason, this particular case was missing. Task-number: QBS-1049 Change-Id: I2ceb000ef5b362754f9fcbccd44b3e3c3e396e46 Reviewed-by: Denis Klychkov <kd.snake@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix VS Qt version matchingJoerg Bornemann2016-11-301-3/+5
| | | | | | | | We must not compare the full compiler versions, but only the major and minor versions. This amends 26c5cbc1. Change-Id: I8e48047ce70ba237fdbb1a8593f2469b2eb7d60a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Prepare VS Qt version matching for VS 2017Joerg Bornemann2016-11-302-19/+19
| | | | | | | | Comparing major versions is not enough for VS 2017 since its compiler has the version number 19.1. Change-Id: I689e2d5399661ed7fe323eea0215d92ea4560e1a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Rename some symbols to disambiguateJake Petroules2016-11-301-12/+12
| | | | | | | | This helps with building an "amalgamation" build of Qbs where all source files are concatenated. Otherwise there are duplicate symbols. Change-Id: Idb92b98709930274aa667d53430f03ac57654c32 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fully qualify referencesJake Petroules2016-11-303-12/+13
| | | | | | | | This helps with building an "amalgamation" build of Qbs where all source files are concatenated. Refereneces to these symbols are otherwise ambiguous. Change-Id: If8cb43b7822fc02df4957a9b5f6b132eae749d7a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add or improve header guards for some filesJake Petroules2016-11-304-6/+16
| | | | | | | | Header guards should be present for all header files and also be unique project-wide. Change-Id: I9943f471792f2944ccfe04cfccef23140cbdf555 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix MSVC warningOrgad Shaneh2016-11-291-1/+1
| | | | | | | MSVC2015-amd64 warns about size_t -> int implicit conversion Change-Id: I6b926e093b57bfbeedb2fbbe2b39c56d72a634f1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Accurate handling of Qt.core.resourcePrefixDenis Klychkov2016-11-281-9/+20
| | | | | | | | | | | Previously the value of this property was taken only from the first input. That value became the only prefix for the whole qrc file. Now every unique value of resourcePrefix generates new <qresource> tag with the corresponding prefix. Change-Id: I2177b3bc38085014c41107225bcb4bd4c51ba58b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Executor: Fix undefined behaviorChristian Kandeler2016-11-281-1/+2
| | | | | | | | | | C++17 introduces new requirements on the template parameters of std::priority_queue. Task-number: QBS-1051 Change-Id: I9a22b8f2d3c1f0bd532b0a76f5d2a16bebc303f7 Reviewed-by: Raphael Kubo da Costa <rakuco@FreeBSD.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Benchmark effort for expanding wildcards during change trackingChristian Kandeler2016-11-282-0/+10
| | | | | | | | This operation is potentially performance-sensitive. Let's gather some real-world data on it. Change-Id: I430ce6c3bb35106b7f2bf37ab978996ba92f36ad Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix Qt 5.6+ main() support for iOS and tvOSAndrew Knight2016-11-251-2/+9
| | | | | | | | Don't link to qtmn in Qt 5.6; in that version it has been superseded by setting the entry point to _qt_main_wrapper. Change-Id: I9941f7347ffbe530550430ce93e1867edbc0985a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not follow symbolic links in File.copy()Christian Kandeler2016-11-251-1/+1
| | | | | | | Doing that is very likely not what the user wants. Change-Id: I1681809e6840745f11f5495cc13e2f0778d08c9a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Work around a QDirIterator peculiarity when expanding wildcardsChristian Kandeler2016-11-251-2/+4
| | | | | | | | | | If we set the filter to include files, symbolic links to directories are suppressed (presumably because QFileInfo::isDir() returns true for them). Task-number: QBS-964 Change-Id: Iab96a2371d99e772f3e1664e1e904f899d068116 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Separate file scope and imports scopeChristian Kandeler2016-11-244-0/+16
| | | | | | | | | | | | | | When evaluating, imported names need to have a higher precedence than names in the item scope, as otherwise they can clash with dependencies of the product (see bug report and autotest). We cannot simply move the file scope's precedence up, because in addition to imports and the "file" and "filePath" properties, it also potentially contains ids from e.g. a module prototype, which would then override the respective entry in the module scope. Task-number: QBS-930 Change-Id: Ifb8b7c933225f872ccc3e878b2bf01b7b0ac0f99 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix "baseValidation" autotest for inferior file systemsChristian Kandeler2016-11-242-1/+1
| | | | | Change-Id: I45a4ef9efa31afa5669fdacf4e2bc5622ea48a69 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix group-level module property evaluation for nested groupsChristian Kandeler2016-11-243-21/+181
| | | | | | | | | The original fix for module properties in groups was done in the 1.6 branch, which does not have nested groups. Task-number: QBS-1005 Change-Id: Ib173dc4d28458ffc0db3fc1e068be86b41096357 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add autotest for calling a base item's validate scriptChristian Kandeler2016-11-235-0/+36
| | | | | | | | Because why not. Task-number: QBS-979 Change-Id: I6fce703e59b7806f634d749dbc90b8d28536d4de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix input.fileName for Scanner itemsJoerg Bornemann2016-11-231-1/+3
| | | | | | | | | | | Let fileName contain the file name and filePath the file path like everywhere else. [ChangeLog] In Scanner items input.fileName now contains a file name, and input.filePath contains the file path. Change-Id: I3abc01989c56940df935047db56055936b3ab224 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ModuleLoader: Check for cyclic dependencies between modulesChristian Kandeler2016-11-236-0/+52
| | | | | | | | Somewhat surprisingly, this was only done for products so far. Task-number: QBS-1044 Change-Id: I5f6cfb904430e42f159486159ead726b522e8f60 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Set product scope in nested groups from modulesChristian Kandeler2016-11-231-1/+2
| | | | | | | This was forgotten when we introduced nested groups. Change-Id: I824cba8c7958902268f188b5a3009d7e252fc39a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Prohibit use of ambiguous idsJoerg Bornemann2016-11-224-0/+38
| | | | | | | | | Like in QML, we now yield an error if the same item id is defined multiple times in one QBS file. Task-number: QBS-1042 Change-Id: Icdae0a95eff34c432cc1a15b310748dfdbab92eb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix usage of ambiguous ids in tst_language::propertiesBlocksJoerg Bornemann2016-11-221-26/+26
| | | | | Change-Id: Ice23078476aa36cf32695f773c6f9722151ff489 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove the concept of an "Export Scope"Christian Kandeler2016-11-188-58/+50
| | | | | | | | | | It turns out that it is not (no longer?) needed, and it introduced subtle differences between Export items and normal modules. Task-number: QBS-1039 Change-Id: Iece1a4ee9ca3ceba16291b31552008ab0bcd60f7 Reviewed-by: Denis Klychkov <kd.snake@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>