diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 285d5090314..85fa7300f1b 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(Git) if(GIT_FOUND) file(WRITE ${CMAKE_BINARY_DIR}/version.cmake " - file(STRINGS \${SRC}/config.inc + file(STRINGS \${CBMC_SOURCE_DIR}/config.inc config_inc_v REGEX \"CBMC_VERSION *= *[0-9\.]+\") string(REGEX REPLACE \"^CBMC_VERSION *= *\" \"\" CBMC_RELEASE \${config_inc_v}) execute_process( @@ -20,7 +20,7 @@ if(GIT_FOUND) else() file(WRITE ${CMAKE_BINARY_DIR}/version.cmake " - file(STRINGS \${SRC}/config.inc + file(STRINGS \${CBMC_SOURCE_DIR}/config.inc config_inc_v REGEX \"CBMC_VERSION *= *[0-9\.]+\") string(REGEX REPLACE \"^CBMC_VERSION *= *\" \"\" CBMC_RELEASE \${config_inc_v}) set(GIT_INFO \"n/a\") @@ -36,7 +36,7 @@ add_custom_target( generate_version_cpp BYPRODUCTS version.cpp COMMAND ${CMAKE_COMMAND} - -D SRC=${CBMC_SOURCE_DIR} + -D CBMC_SOURCE_DIR=${CBMC_SOURCE_DIR} -D CUR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_BINARY_DIR}/version.cmake )