-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add a cpp file for version information
This should allow us to update the version information on each commit, but still cache most of the build. The single compilation unit for version.cpp won't be cached, but everything else can be cached, as the compiler arguments won't change on every commit.
- Loading branch information
1 parent
4e9680e
commit 987fd80
Showing
6 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "core/version.h" | ||
|
||
namespace core { | ||
QString knut_version() | ||
{ | ||
return "${KNUT_VERSION_STRING}"; | ||
} | ||
|
||
QString knut_build_date() { | ||
return "${KNUT_BUILDDATE}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
|
||
#include <QString> | ||
|
||
namespace core { | ||
QString knut_version(); | ||
QString knut_build_date(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#include "core/version.h" | ||
#include "gui/knutmain.h" | ||
|
||
#include <QApplication> | ||
|
@@ -19,7 +20,7 @@ int main(int argc, char *argv[]) | |
|
||
QApplication::setOrganizationName("KDAB"); | ||
QApplication::setApplicationName("knut"); | ||
QApplication::setApplicationVersion(KNUT_VERSION_STRING); | ||
QApplication::setApplicationVersion(core::knut_version()); | ||
QApplication::setWindowIcon(QIcon(":/gui/icons/knut-64.png")); | ||
|
||
Q_INIT_RESOURCE(core); | ||
|