Skip to content

Commit 583a06b

Browse files
authored
Merge pull request #1119 from bitshares/oxarbitrage-patch-4
add USE_PROFILER to Cmake
2 parents 412f166 + 1f435ee commit 583a06b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ if (USE_PCH)
3232
include (cotire)
3333
endif(USE_PCH)
3434

35+
option(USE_PROFILER "Build with GPROF support(Linux)." OFF)
36+
3537
IF( NOT WIN32 )
3638
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libraries/fc/CMakeModules" )
3739
ENDIF( NOT WIN32 )
@@ -112,6 +114,9 @@ else( WIN32 ) # Apple AND Linux
112114
# Linux Specific Options Here
113115
message( STATUS "Configuring BitShares on Linux" )
114116
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -Wall" )
117+
if(USE_PROFILER)
118+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg" )
119+
endif( USE_PROFILER )
115120
set( rt_library rt )
116121
set( pthread_library pthread)
117122
if ( NOT DEFINED crypto_library )
@@ -203,3 +208,7 @@ endif(LINUX)
203208

204209
include(CPack)
205210
endif(ENABLE_INSTALLER)
211+
212+
MESSAGE( STATUS "" )
213+
MESSAGE( STATUS "PROFILER: ${USE_PROFILER}" )
214+
MESSAGE( STATUS "" )

0 commit comments

Comments
 (0)