# HG changeset patch # User Sebastien Decugis # Date 1277786469 -32400 # Node ID 4a5211430f635d840e896cfffe72607c2bf64d61 # Parent adffe87cfb6d4844296462d2f1819935f900069f Added a Profiling build type diff -r adffe87cfb6d -r 4a5211430f63 CMakeLists.txt --- a/CMakeLists.txt Tue Jun 29 12:23:50 2010 +0900 +++ b/CMakeLists.txt Tue Jun 29 13:41:09 2010 +0900 @@ -35,9 +35,15 @@ # All source code should be POSIX 200112L compatible, but some other extensions might be used, so: ADD_DEFINITIONS(-D_GNU_SOURCE) -IF (CMAKE_BUILD_TYPE MATCHES "Debug") + +# Add a "Profiling" build type +SET(CMAKE_BUILD_TYPE Profiling) +SET(CMAKE_C_FLAGS_PROFILING "-fprofile-arcs -ftest-coverage") + +# Set the DEBUG flag for Debug and Profiling builds +IF (CMAKE_BUILD_TYPE MATCHES "Debug|Profiling") SET(DEBUG 1) -ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug") +ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug|Profiling") # some subfolders use yacc and lex parsers SET(BISON_GENERATE_DEFINES TRUE)