[calamares] Try to reduce compile-churn with version header
- Very rarely do we need the full-git-version of Calamares, so split that into a separate header with a little trickery. - In the "normal" version header, drop the full-git-version values.
This commit is contained in:
parent
b06498194e
commit
9568fc082f
@ -537,7 +537,11 @@ if( CALAMARES_VERSION_RC )
|
||||
set( CALAMARES_VERSION ${CALAMARES_VERSION}rc${CALAMARES_VERSION_RC} )
|
||||
endif()
|
||||
|
||||
# additional info for non-release builds
|
||||
# Additional info for non-release builds. The "extended" version information
|
||||
# with date and git information (commit, dirty status) is used only
|
||||
# by CalamaresVersionX.h, which is included by consumers that need a full
|
||||
# version number with all that information; normal consumers can include
|
||||
# CalamaresVersion.h with more stable numbers.
|
||||
if( NOT BUILD_RELEASE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/" )
|
||||
include( CMakeDateStamp )
|
||||
set( CALAMARES_VERSION_DATE "${CMAKE_DATESTAMP_YEAR}${CMAKE_DATESTAMP_MONTH}${CMAKE_DATESTAMP_DAY}" )
|
||||
|
@ -4,7 +4,7 @@
|
||||
#cmakedefine CALAMARES_ORGANIZATION_NAME "${CALAMARES_ORGANIZATION_NAME}"
|
||||
#cmakedefine CALAMARES_ORGANIZATION_DOMAIN "${CALAMARES_ORGANIZATION_DOMAIN}"
|
||||
#cmakedefine CALAMARES_APPLICATION_NAME "${CALAMARES_APPLICATION_NAME}"
|
||||
#cmakedefine CALAMARES_VERSION "${CALAMARES_VERSION}"
|
||||
#cmakedefine CALAMARES_VERSION "${CALAMARES_VERSION_SHORT}"
|
||||
#cmakedefine CALAMARES_VERSION_SHORT "${CALAMARES_VERSION_SHORT}"
|
||||
|
||||
#cmakedefine CALAMARES_VERSION_MAJOR "${CALAMARES_VERSION_MAJOR}"
|
||||
|
13
src/calamares/CalamaresVersionX.h.in
Normal file
13
src/calamares/CalamaresVersionX.h.in
Normal file
@ -0,0 +1,13 @@
|
||||
// Same as CalamaresVersion.h, but with a full-git-extended VERSION
|
||||
// rather than the short (vM.m.p) semantic version.
|
||||
#ifndef CALAMARES_VERSION_H
|
||||
|
||||
// On purpose, do not define the guard, but let CalamaresVersion.h do it
|
||||
// #define CALAMARES_VERSION_H
|
||||
|
||||
#include "CalamaresVersion.h"
|
||||
|
||||
#undef CALAMARES_VERSION
|
||||
#cmakedefine CALAMARES_VERSION "${CALAMARES_VERSION}"
|
||||
|
||||
#endif // CALAMARES_VERSION_H
|
Loading…
Reference in New Issue
Block a user