From 94dab852758a9d5a85e8c3d9e0a89f2aa26fa1b7 Mon Sep 17 00:00:00 2001 From: Sean Qureshi Date: Wed, 7 Aug 2013 18:52:11 -0700 Subject: [PATCH] Adds full -D support to toxics versioning, includes the commit number --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f30d8e9..38f02dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.6.0) project(toxic C) +execute_process(COMMAND git rev-list HEAD --count OUTPUT_VARIABLE COMMIT) +SET(GCC_COVERAGE_COMPILE_FLAGS '-DTOXICVER="0.1.1_r${COMMIT}"') +add_definitions(${GCC_COVERAGE_COMPILE_FLAGS}) set(exe_name toxic) add_executable(${exe_name}