[vlmc-devel] commit: Allow the project to be configured for gprof. ( Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Thu Mar 18 14:34:00 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Thu Mar 18 12:12:44 2010 +0100| [971fa5637c55a7fb4d45a59a52ae2c79638d5136] | committer: Hugo Beauzee-Luyssen 

Allow the project to be configured for gprof.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=971fa5637c55a7fb4d45a59a52ae2c79638d5136
---

 CMakeLists.txt     |    4 ++++
 src/CMakeLists.txt |    7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6851c6c..2927589 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,10 @@ ENDIF(WIN32)
 # VLMC requires libVLC
 #SET (WITH_LIBVLC FALSE CACHE BOOL "Compile LibVLC in VLMC")
 
+IF (UNIX)
+    SET(WITH_PROFILING FALSE CACHE BOOL "Build with profiling support" )
+ENDIF(UNIX)
+
 SET(WITH_CRASHBUTTON FALSE CACHE BOOL "Enable the crash button")
 SET(WITH_CRASHHANDLER_GUI TRUE CACHE BOOL "Enable the crash handler GUI (with backtrace and restart capabilities)")
 SET(WITH_CRASHHANDLER TRUE CACHE BOOL "Enable the crash handler")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f27d59b..28ae64d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -268,4 +268,11 @@ ADD_CUSTOM_COMMAND(
     DEPENDS ${CMAKE_BINARY_DIR}/src/vlmc
 )
 
+IF(UNIX)
+    IF (WITH_PROFILING)
+        ADD_DEFINITIONS( -pg )
+        SET_TARGET_PROPERTIES( vlmc PROPERTIES LINK_FLAGS -pg )
+        #TARGET_LINK_LIBRARIES( vlmc -pg )
+    ENDIF(WITH_PROFILING)
+ENDIF(UNIX)
 



More information about the Vlmc-devel mailing list