aboutsummaryrefslogtreecommitdiffstats
path: root/doc/reference/jsextensions
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-10-17 16:22:52 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-11-10 10:48:11 +0100
commit3957fb612ae250671df02af67da2123ff65af232 (patch)
tree9e271070b06c389559ffce6d2d0d243e2a6e5f5c /doc/reference/jsextensions
parent9f6b297ca49a5eb376d11d130b240a8c8629e250 (diff)
Use a hashing function to construct output artfact file paths.
Modules like cpp need a way to construct unique locations for output artifacts, but the current approach of duplicating the path to the input file in the build directory can lead to excessively long file paths that hit the limit on Windows. So let's hash the path to the input file instead. Change-Id: I47dcd242d0ee90c377f2a6df8e270bbefbaf082f Reviewed-by: Thomas Epting <thomas.epting@stryker.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'doc/reference/jsextensions')
-rw-r--r--doc/reference/jsextensions/jsextensions-general.qdoc10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/reference/jsextensions/jsextensions-general.qdoc b/doc/reference/jsextensions/jsextensions-general.qdoc
index 9582772fc..2bbd2f7ac 100644
--- a/doc/reference/jsextensions/jsextensions-general.qdoc
+++ b/doc/reference/jsextensions/jsextensions-general.qdoc
@@ -49,6 +49,16 @@
Tries to find a variable with the given name in the build environment and returns its value. If
no such variable could be found, \c undefined is returned.
+ \section2 qbs.getHash
+ \code
+ qbs.getHash(key: string): string
+ \endcode
+ Calculates a 16-byte hash of the input and returns it.
+ Rules in modules should use this function to find unique locations for output
+ artifacts in the build directory without duplicating the whole directory structure of
+ the respective input file (to deal with the case of two files with the same name in different
+ subdirectories of the same product).
+
\section2 qbs.rfc1034Identifier
\code
qbs.rfc1034Identifier(str: string): string