aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp
Commit message (Collapse)AuthorAgeFilesLines
* GCC module: Only use -fvisibility-inlines-hidden for C++ code.Christian Kandeler2014-07-281-1/+1
| | | | | | | It's not supported for other languages. Change-Id: I69ed8acfd4c693036d341bbdf0cce1e3190467ea Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* simplify signature of MSVC.prepareLinkerJoerg Bornemann2014-07-222-13/+10
| | | | | Change-Id: I6dc05e5ef71e4fd54e3a27b5e13de9bdb9c57940 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* simplify signature of MSVC.prepareCompilerJoerg Bornemann2014-07-222-28/+17
| | | | | Change-Id: I1c42f03aa7aa539560ba3da520a2df16758f9485 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add support for compiling Interface Builder storyboards.Jake Petroules2014-07-221-2/+2
| | | | | | | | As a side effect, some capabilities introduced here also apply to XIBs. Task-number: QBS-466 Change-Id: I27eaf1a9a73ef25475b4f6b2bc971dcd941b6371 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add support for compiling Xcode asset catalogs.Jake Petroules2014-07-221-4/+16
| | | | | | Task-number: QBS-389 Change-Id: I2d93a55228c6ada801ed889404fac753182b82f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add support for compiling OS X icon sets.Jake Petroules2014-07-211-2/+2
| | | | | | Task-number: QBS-493 Change-Id: Ie6e4a00f672ce4305f03e00ec0b0b7ebcbd942c3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Cpp module: Fix "visibility" property.Christian Kandeler2014-07-182-4/+4
| | | | | | | | The GCC visibility options can be combined. Change-Id: I9fe5c9bb80f2fcc97cd5a5bc0651314ecd180e51 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* deprecate Artifact.fileName in favor of Artifact.filePathJoerg Bornemann2014-07-165-30/+30
| | | | | | | | This property is actually a file path, not a mere name. Task-number: QBS-579 Change-Id: I04e8f03eac97b5f86fe743a4923888a3d2a82c5d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Remove CFBundleIconFile default Info.plist key.Jake Petroules2014-07-141-3/+0
| | | | | | | | This is a useless assumption; let asset catalogs or the future icon support handle this instead. Change-Id: I34a28ce27b5e20680a8235b67ac8a73cca036530 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* work around bug in icecc clientJoerg Bornemann2014-07-141-11/+35
| | | | | | | | | | | When passing the -x argument to gcc, current icecc versions (at least until 1.0.1) refuse to distribute the job to a remote machine. We work around this issue by skipping the -x argument if the file tag matches the language determined by the file extension. Task-number: QBS-625 Change-Id: Id12a158b8adf202ddc771f411e9539e26a5598be Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* introduce cpp.compilerPathByLanguageJoerg Bornemann2014-07-142-1/+10
| | | | | | | | | | The setup-toolchains tool stores the compiler path per language in compilerPathByLanguage for toolchains that provide different compiler binaries for different languages. For the gcc/clang toolchains we now use g++/clang++ for C++ and gcc/clang for everything else. Change-Id: I62ce5a5a4217e2832fafd03301ff75efab62a608 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* make the GCC linkerName different from compilerNameJoerg Bornemann2014-07-111-1/+1
| | | | | | | | In a subsequent commit we want to use "gcc" for compilerName but keep "g++" for linkerName. Same for clang. Change-Id: Id179ef9152e6fe3d729505f53fc57e39cb46d99e Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* introduce cpp.entryPointJoerg Bornemann2014-06-023-0/+11
| | | | | | | | | Set cpp.entryPoint to specify the entry point symbol for an executable or dynamic library. Task-number: QBS-602 Change-Id: I83e7c13b4ab7675a1cfa0cc8a2234cba0f850b3d Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* introduce cpp.useRPathsJoerg Bornemann2014-05-282-1/+3
| | | | | | | | | Set this property to false to prevent the linker from writing rpaths to the binary. Task-number: QBS-594 Change-Id: Ife1ad9fa40bc2b792bf78af4f349fe6a80095d35 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix access to null object in MSVC linker rules.Christian Kandeler2014-05-281-1/+1
| | | | | | | | We no longer require object files to be present when linking. Change-Id: I7110df35e65578964b7f4b5d12b8b10a5854cc01 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* add product name to OS X command descriptionsJoerg Bornemann2014-05-221-3/+3
| | | | | | Change-Id: I52c8f64f65ef6cb07719c854c46d49202fbca34a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* use {input|output}.fileName where appropriateJoerg Bornemann2014-05-205-20/+19
| | | | | | Change-Id: I793210ba6eeeb3a15e78282e14b8e5ad6459c078 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Merge remote-tracking branch 'origin/1.2'Joerg Bornemann2014-05-161-1/+1
|\ | | | | | | Change-Id: I19d714d5c860268aaed6d7b6cf254c0b55b159c6
| * MSVC: do not use deprecated input.fileName propertyJoerg Bornemann2014-05-161-1/+1
| | | | | | | | | | Change-Id: I3b8528765295dcb38fc651a83bf7b093dc2c6a53 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
| * add missing loadFile call from msvc.jsJoerg Bornemann2014-04-231-0/+2
| | | | | | | | | | Change-Id: I9eba26d3b66056b21ca78ccb6eb9406cc43a7288 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | remove deprecated cpp.windowsSDKPathJoerg Bornemann2014-05-161-1/+0
| | | | | | | | | | | | Change-Id: I7bc372ed04fa7f950f6b62cf1b5691cca1d369e5 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Fix MSVC working directory.Christian Kandeler2014-05-131-1/+1
| | | | | | | | | | | | | | The directory for object files has changed. Change-Id: I78109ccfd2a23aedb2cd5a57ef689099d621e485 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Introduce sensible build directory values.Christian Kandeler2014-05-134-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, all products share the same build directory, and rules are responsible for making their artifact file paths unique, which is annoying for module authors and introduces lots of code duplication. Instead, make the product build directories unique and let these directories be the base directory of relative artifact file paths. Also export the top-level build dir as project.buildDirectory to the JavaScript side so rules can refer to that one if necessary. Task-number: QBS-567 Change-Id: I257d37cad01ec6dece3e214799b917149677d80c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | fix usages of WindowsUtilsJoerg Bornemann2014-04-252-3/+5
| | | | | | | | | | | | | | | | This amends 661de9d74ee8e74dbe85a5c52563094f63ee03c0. Change-Id: Ie8ed84ceb44046797b7be55536cdbebb62fa0b83 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Add a PropertyValidator class to centralize Module.validate operations.Jake Petroules2014-04-241-4/+4
| | | | | | | | | | | | | | | | | | Utilize the new class where warranted. This provides consistent error messages for users and makes module validation significantly simpler for developers. Change-Id: I3233392a80882ba08cc073ec613534b929abb1e9 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Use proper and consistent formatting in all JavaScript files.Jake Petroules2014-04-142-21/+11
| | | | | | | | | | Change-Id: I730e39070e2e93fea54e6a4fc52738c05f009e0e Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Refactor JavaScript functions into more sensible locations.Jake Petroules2014-04-142-44/+7
| | | | | | | | | | | | | | NOTE: Gcc.removePrefixAndSuffix had no callers and was removed. Change-Id: I9668ba213953698bc438ef3777cef77665a09072 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Pass the product to PathTools functions for proper encapsulation.Jake Petroules2014-04-143-12/+12
| | | | | | | | | | Change-Id: Idcfbb37830e56b09af56d087b710b7e64fb66c0c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Move several JS files in the cpp module to imports.Jake Petroules2014-04-1410-592/+13
|/ | | | | | | | | | | | | | | | | | All of these files are generically useful and not specific to C++. - BundleTools/DarwinTools are useful on OS X in general and are used by both the C++ and Interface Builder modules. PathTools also uses DarwinTools. - PathTools is currently only used by the C++ module but contains general filename functions that can be shared across multiple native language modules, like C++, Go, etc. - WindowsUtils contains functions general to the Windows OS. These imports should not yet be documented as further refactoring is necessary. Change-Id: I503773af268eabf8a77ebfc8a5809b9ddcad7af2 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* load PropertyList extension in bundle-tools.jsJoerg Bornemann2014-04-111-0/+2
| | | | | | Task-number: QBS-549 Change-Id: I1a02ec28aa1be4191b8e6070674b3407154cfc98 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add Windows 6.3 (8.1) to the list of known versions.Jake Petroules2014-04-081-1/+1
| | | | | | Change-Id: I4989605776cf6dbbc8a8852d88f0fc6262f08f0b Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* detect Visual Studio build environment using vcvarsall.batJoerg Bornemann2014-04-081-40/+1
| | | | | | | | | | | | | | | To provide a consistent build environment for Visual Studio setup-toolchains now executes the vsvarsall.bat that comes with the Visual Studio installation. The environment is written to the profile under the key "buildEnvironment". The setupBuildEnvironment script in windows-msvc.qbs isn't needed anymore. Task-number: QBS-444 Task-number: QBS-508 Change-Id: I3191f5ff127bed6b96ce5ea5520b20fc9646364f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Added PathTools import to DarwinGCCIvan Komissarov2014-04-071-0/+1
| | | | | | | This fixes compilation error under Mac OS X. Change-Id: I08093ef6033fe9a4869c05e4b7c4f5a7dd45136d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix library dependency orderJoerg Bornemann2014-03-142-9/+14
| | | | | | | | | Autotest from the bug report added. Task-number: QBS-524 Change-Id: I2ef3485db749424339a2ea96900e49fa5d1363d4 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Replace qmake placeholders in Info.plist.Jake Petroules2014-03-121-1/+16
| | | | | | | Task-number: QBS-469 Change-Id: I14a53fa63c5c98baebd1c2c452bbf1e2d7b3df71 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Support the qmake/CMake-style @SYNTAX@ in Info.plist replacement vars.Jake Petroules2014-03-121-24/+45
| | | | | | | Also, this makes it trivial to add arbitrary new syntaxes if desired. Change-Id: I5622b03b284b47236b425f94c140d2a01f1b8d55 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Rename doRepl to expandPlistEnvironmentVariables.Jake Petroules2014-03-122-6/+7
| | | | | | | Because, that's what it does. Change-Id: Ibd6e5b4fc310be8ac48d8089fc163dcc678460be Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Use PropertyList instead of plutil for increased performance.Jake Petroules2014-03-042-55/+39
| | | | | Change-Id: I8ff5b11ed06bb2817e47a973d1a8043c5bcd3237 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QBS: Add a new linkerScripts property for the CppModuleDenis Shienkov2014-02-282-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Linkers of the majority Embedded projects (like the "bare metal" without an OS) require of the script files which contain directives for placement a binary code of FW to the desired address space of the target MCU. When using a QBS project it can be implemented by adding to the "cpp.linkerFlags" property, e.g. : cpp.linkerFlags: [ "-T", "<path/to/script/file>" ] But this solution has a shortcomings related to need to specify a full paths to the scripts files and so on. Therefore was introduced a new "cpp.linkerScripts" property which requires specifying of the list of used scripts files with the relative paths concerning of the *.qbs project file, e.g. : cpp.linkerScripts: [ "<scriptfile1>", "<scriptfile2>" ] Note: This property is implemented only for the GCC compiler module. Change-Id: I9f30a054e615a1cef8ca022352706eb3448bc7cd Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* import qbs.FileInfo in darwin-tools.jsJoerg Bornemann2014-02-283-2/+1
| | | | | | | Also remove now superfluous imports. Change-Id: I548b6b0c2f3ff06472cfb40c579af7d9c65ed21f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* move import of bundle-tools.js to path-tools.jsJoerg Bornemann2014-02-283-2/+2
| | | | | | | And remove it from where it isn't needed. Change-Id: I51dc33e1dce4fd43b7b3080ef6e277e7c6b9b725 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* move import of windows.js out of GenericGCC.qbsJoerg Bornemann2014-02-282-1/+2
| | | | | Change-Id: I5429af5524cc4adbf889e305cafce55f409624f1 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add retina display support to the default Info.plist.Jake Petroules2014-02-281-2/+6
| | | | | | | Task-number: QBS-529 Change-Id: I77c5db7f0e3516ac3022468a2c242ffcf5441401 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Use getNativeSetting instead of sw_vers for increased performance.Jake Petroules2014-02-271-4/+2
| | | | | Change-Id: I9dd122b592870eecd8bb011c52fc88e6374a4fce Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* use filePath instead of fileName where applicableJoerg Bornemann2014-02-257-59/+59
| | | | | | | | This fixes the recently introduced deprecation warnings. Task-number: QBS-258 Change-Id: I10660270895ec89a1444d596922c22e9658ca3ab Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix typo in smart relinking code.Christian Kandeler2014-02-201-1/+1
| | | | | | | | This one was not noticed in initial testing, as it hits only if the symbol count is the same. Change-Id: Id89cae0a526557a15bd6b809aca64aacfecaef78 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Ignore object addresses and sizes when doing smart relinking.Christian Kandeler2014-02-191-1/+17
| | | | | | | Only symbol name and type are interesting. Change-Id: Ife3373644a06b4aaca9159f5f4f887ddcfc912bd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Check for dynamic symbols when doing smart re-linking.Christian Kandeler2014-02-171-1/+1
| | | | | | | | | By default, nm lists the symbols from the normal symbol table, which get removed when stripping. As a result, the current implementation fails for release builds. Change-Id: I922623fb24694340a675804ffa13057ce12c70f2 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix order of libraries in gcc link command lineJoerg Bornemann2014-01-302-4/+22
| | | | | | | | | | | Array.uniqueConcat cannot be used to remove duplicates, because the right-most duplicates are removed. To keep the dependencies ordered correctly, we must remove the left-most duplicates instead. Task-number: QBS-503 Change-Id: I5a2834905f650e0921bc42f9cffe15b71128ff7e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix duplicate arguments in linker command lineJoerg Bornemann2014-01-292-3/+3
| | | | | | | Task-number: QBS-501 Change-Id: I103041729bcdef35bd62a3ed8ec9190c684d17b5 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>