mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 14:09:26 +00:00
Specify VERSION in modern CMake
This commit is contained in:
parent
15ad95c8db
commit
1e3ddbb496
3 changed files with 4 additions and 6 deletions
|
@ -128,13 +128,12 @@ def updateConanTestFile(version):
|
|||
f.write( line + "\n" )
|
||||
|
||||
def updateCmakeFile(version):
|
||||
cmakeParser = re.compile(r'set(CATCH_VERSION_NUMBER \d+\.\d+\.\d+)')
|
||||
with open(cmakePath, 'r') as file:
|
||||
lines = file.readlines()
|
||||
with open(cmakePath, 'w') as file:
|
||||
for line in lines:
|
||||
if 'set(CATCH_VERSION_NUMBER ' in line:
|
||||
file.write('set(CATCH_VERSION_NUMBER {0})\n'.format(version.getVersionString()))
|
||||
if 'project(Catch2 LANGUAGES CXX VERSION ' in line:
|
||||
file.write('project(Catch2 LANGUAGES CXX VERSION {0})\n'.format(version.getVersionString()))
|
||||
else:
|
||||
file.write(line)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue