Skip to content

Commit

Permalink
Extend project call for Catch2
Browse files Browse the repository at this point in the history
This provides some extra metadata for CPack and related tools.
  • Loading branch information
horenmar committed May 17, 2022
1 parent dcafc60 commit abb669d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Expand Up @@ -36,7 +36,13 @@ if(CMAKE_VERSION VERSION_GREATER 3.8)
endif()


project(Catch2 LANGUAGES CXX VERSION 3.0.0)
project(Catch2
VERSION 3.0.0 # CML version placeholder, don't delete
LANGUAGES CXX
HOMEPAGE_URL "https://github.com/catchorg/Catch2"
DESCRIPTION "A modern, C++-native, unit test framework."
)


# Provide path for scripts. We first add path to the scripts we don't use,
# but projects including us might, and set the path up to parent scope.
Expand Down
4 changes: 2 additions & 2 deletions tools/scripts/releaseCommon.py
Expand Up @@ -82,8 +82,8 @@ def updateVersionFile(self):
def updateCmakeFile(version):
with open(cmakePath, 'rb') as file:
lines = file.readlines()
replacementRegex = re.compile(b'project\\(Catch2 LANGUAGES CXX VERSION \\d+\\.\\d+\\.\\d+\\)')
replacement = 'project(Catch2 LANGUAGES CXX VERSION {0})'.format(version.getVersionString()).encode('ascii')
replacementRegex = re.compile(b'''VERSION (\\d+.\\d+.\\d+) # CML version placeholder, don't delete''')
replacement = '''VERSION {0} # CML version placeholder, don't delete'''.format(version.getVersionString()).encode('ascii')
with open(cmakePath, 'wb') as file:
for line in lines:
file.write(replacementRegex.sub(replacement, line))
Expand Down

0 comments on commit abb669d

Please sign in to comment.