File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.2)
2
2
3
- project (CBMC)
3
+
4
+ # Grab the current CBMC version from config.inc
5
+ # We do this so we have a matching cbmc version between the Makefile build and
6
+ # the CMake build. This version info is useful for things like generating
7
+ # packages (which usually need to contain version info in their metadata and
8
+ # filenames)
9
+ file (
10
+ STRINGS src/config.inc CBMC_VERSION
11
+ REGEX "CBMC_VERSION = (.*)" )
12
+ string (REGEX REPLACE "CBMC_VERSION = (.*)" "\\ 1" CBMC_VERSION ${CBMC_VERSION} )
13
+
14
+ project (CBMC VERSION ${CBMC_VERSION} )
15
+
16
+ # when config.inc changes we’ll need to reconfigure to check if the version changed
17
+ set_property (DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /src/config.inc" )
4
18
5
19
find_program (CCACHE_PROGRAM ccache)
6
20
if (CCACHE_PROGRAM)
You can’t perform that action at this time.
0 commit comments