Added profiling option to CMake. Adding the -DPROFILE=Y to the CMake command now compiles executables with the -pg flag.

This commit is contained in:
Markus Makela 2015-04-09 17:21:02 +03:00
parent a6ca4a8e0a
commit 60a0cbb306

View File

@ -86,6 +86,9 @@ if(FAKE_CODE)
set(FLAGS "${FLAGS} -DFAKE_CODE" CACHE STRING "Compilation flags")
endif()
if(PROFILE)
set(FLAGS "${FLAGS} -pg " CACHE STRING "Compilation flags")
endif()
set(CMAKE_C_FLAGS "${FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "${DEBUG_FLAGS} -DSS_DEBUG")