Fix PCH to recompile on version change

This commit is contained in:
Wilson Snyder 2023-10-31 08:10:41 -04:00
parent c241ec90ec
commit a27abab65f
2 changed files with 12 additions and 0 deletions

View File

@ -24,6 +24,10 @@ AC_SUBST(PACKAGE_VERSION_NUMBER)
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_NUMBER_STRING],["$PACKAGE_VERSION_NUMBER"],[Package version as a number])
VERILATOR_VERSION_INTEGER=`AS_ECHO("$PACKAGE_VERSION") | [sed 's/\([0-9]\)\.\([0-9][0-9][0-9]\) .*/\1\2000/g']`
AC_SUBST(VERILATOR_VERSION_INTEGER)
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_STRING_CHAR],
[static const char* const PACKAGE_STRING_UNUSED = "$PACKAGE_STRING";],
[Package version as a number])
AC_SUBST(PACKAGE_VERSION_STRING_CHAR)
# Ignore automake flags passed by Ubuntu builds
AC_ARG_ENABLE([dependency-tracking],

View File

@ -19,6 +19,14 @@
#define PACKAGE_VERSION_NUMBER_STRING "0.000"
// Otherwise Autoheader generates it (with all the same macros and more)
// Force ccache recompilation on PACKAGE_STRING change
#ifndef VL_CPPCHECK
#ifndef PACKAGE_VERSION_STRING_CHAR
#define PACKAGE_VERSION_STRING_CHAR
PACKAGE_VERSION_STRING_CHAR
#endif
#endif
//**********************************************************************
//**** Configure-discovered library options