diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-04-23 10:37:44 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-04-23 13:06:13 +0000 |
commit | a6120f687ee4dc7641e3ea80dc7401915bfd14c9 (patch) | |
tree | c47c3a11ff091125590736d91b5232e771e2fd71 /share | |
parent | fc28c8de88a66f47fd110b362f849ed3e87a175c (diff) |
vcs module: Create header file even without a repository being present
This makes things more convenient for project authors, and a small
header file getting generated once does not slow down the build
unnecessarily.
Task-number: QBS-1337
Change-Id: I3f48106898418eba8236aad0c3f808d4c027e24b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/modules/vcs/vcs-module.qbs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/qbs/modules/vcs/vcs-module.qbs b/share/qbs/modules/vcs/vcs-module.qbs index a56eb3b49..2c2cc2c37 100644 --- a/share/qbs/modules/vcs/vcs-module.qbs +++ b/share/qbs/modules/vcs/vcs-module.qbs @@ -127,7 +127,7 @@ Module { } Rule { - condition: repoState && headerFileName + condition: headerFileName multiplex: true Artifact { filePath: FileInfo.joinPaths(product.vcs.includeDir, product.vcs.headerFileName) @@ -143,7 +143,7 @@ Module { try { f.writeLine("#ifndef VCS_REPO_STATE_H"); f.writeLine("#define VCS_REPO_STATE_H"); - f.writeLine('#define VCS_REPO_STATE "' + repoState + '"') + f.writeLine('#define VCS_REPO_STATE "' + (repoState ? repoState : "none") + '"') f.writeLine("#endif"); } finally { f.close(); |