From 5199d8ea653e81f62d33a4a90d0e19702ae7b905 Mon Sep 17 00:00:00 2001 From: dhewg Date: Thu, 19 Jan 2012 00:45:15 +0100 Subject: [PATCH] Add the build target "Profile" suitable for profiling --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2793b6a..69c8e47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,11 +129,13 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") set(CMAKE_C_FLAGS_DEBUG "-g -D_DEBUG -O1") set(CMAKE_C_FLAGS_DEBUGALL "-g -ggdb -D_DEBUG") + set(CMAKE_C_FLAGS_PROFILE "-g -ggdb -D_DEBUG -O1 -fno-omit-frame-pointer") set(CMAKE_C_FLAGS_RELEASE "-O3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer") set(CMAKE_C_FLAGS_MINSIZEREL "-Os -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer") set(CMAKE_CXX_FLAGS_DEBUGALL ${CMAKE_C_FLAGS_DEBUGALL}) + set(CMAKE_CXX_FLAGS_PROFILE ${CMAKE_C_FLAGS_PROFILE}) add_definitions(-fno-strict-aliasing)