diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e91e80b57..cf16db8d91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,8 @@ if (USE_PCH) include (cotire) endif(USE_PCH) +option(USE_PROFILER "Build with GPROF support(Linux)." OFF) + IF( NOT WIN32 ) list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libraries/fc/CMakeModules" ) ENDIF( NOT WIN32 ) @@ -112,6 +114,9 @@ else( WIN32 ) # Apple AND Linux # Linux Specific Options Here message( STATUS "Configuring BitShares on Linux" ) set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -Wall" ) + if(USE_PROFILER) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg" ) + endif( USE_PROFILER ) set( rt_library rt ) set( pthread_library pthread) if ( NOT DEFINED crypto_library ) @@ -203,3 +208,7 @@ endif(LINUX) include(CPack) endif(ENABLE_INSTALLER) + +MESSAGE( STATUS "" ) +MESSAGE( STATUS "PROFILER: ${USE_PROFILER}" ) +MESSAGE( STATUS "" )