diff options
author | Antenore Gatta <antenore@simbiosi.org> | 2018-05-04 13:31:38 +0300 |
---|---|---|
committer | Antenore Gatta <antenore@simbiosi.org> | 2018-05-04 13:31:38 +0300 |
commit | 32c92e0168d72213eeb6a676c9001a5331893b3f (patch) | |
tree | b2f9ba062d5202efaf5313e79e8cb8742b457b1c /CMakeLists.txt | |
parent | d69478353e72e4b3a795e60e489dc1607419c56c (diff) |
Added GCC profiling
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ae5200585..8a9c54009 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,6 +211,10 @@ if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang" AND WITH_CLANG_COVERAGE) add_definitions(-DWITH_CLANG_COVERAGE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fprofile-instr-generate -fcoverage-mapping") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-instr-generate") +elseif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND WITH_GCC_PROFILING) + message(STATUS "Enabling profiling.") + add_definitions(-DWITH_GCC_PROFILING) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg") endif() find_suggested_package(GCRYPT) |