The cmake option AUTOMATED_BUILD_SYSTEM is removed and replaced by an automated detection. Now it is possible to ship source tarballs that build without mercurial on all platforms. The needed information is generated by the script tools/generateReleaseInfo.{sh,bat} before the tarball is build.
15 lines
772 B
Batchfile
15 lines
772 B
Batchfile
@echo off
|
|
for /f "tokens=*" %%a in ('hg branch') do @set hgBranch=%%a
|
|
for /f "tokens=*" %%a in ('hg parents --template "{latesttag}"') do @set hgLatesttag=%%a
|
|
for /f "tokens=*" %%a in ('hg parents --template "{latesttagdistance}"') do @set hgLatesttagdistance=%%a
|
|
for /f "tokens=*" %%a in ('hg parents --template "{node|short}"') do @set hgChangeset=%%a
|
|
|
|
echo set(HG_BRANCH %hgBranch%) > ReleaseInfo.cmake
|
|
echo set(HG_VERSION %hgLatesttag%.%hgLatesttagdistance%) >> ReleaseInfo.cmake
|
|
echo set(HG_CHANGESET %hgChangeset%) >> ReleaseInfo.cmake
|
|
echo set(HG_TAGDISTANCE %hgLatesttagdistance%) >> ReleaseInfo.cmake
|
|
echo if (CACHE_NAME_SUFFIX STREQUAL "") >> ReleaseInfo.cmake
|
|
echo set(CACHE_NAME_SUFFIX %hgLatesttag%) >> ReleaseInfo.cmake
|
|
echo endif() >> ReleaseInfo.cmake
|
|
|