Skip to content

Commit 2e7d457

Browse files
committed
cmake: remove option to add profiling flags
We currently have an option that adds options for profiling to both our CFLAGS and LDFLAGS. Having such flags behind various build options is not really sensible at all, since users should instead set up those flags via environment variables supported by CMake itself. Let's remove this option.
1 parent 2551b1b commit 2e7d457

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ OPTION(THREADSAFE "Build libgit2 as threadsafe" ON)
4949
OPTION(BUILD_CLAR "Build Tests using the Clar suite" ON)
5050
OPTION(BUILD_EXAMPLES "Build library usage example apps" OFF)
5151
OPTION(BUILD_FUZZERS "Build the fuzz targets" OFF)
52-
OPTION(PROFILE "Generate profiling information" OFF)
5352
OPTION(ENABLE_TRACE "Enables tracing support" ON)
5453
OPTION(LIBGIT2_FILENAME "Name of the produced binary" OFF)
5554
OPTION(USE_SSH "Link with libssh2 to enable SSH support" ON)
@@ -265,11 +264,6 @@ ELSE ()
265264
IF("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
266265
DISABLE_WARNINGS(documentation-deprecated-sync)
267266
ENDIF()
268-
269-
IF (PROFILE)
270-
SET(CMAKE_C_FLAGS "-pg ${CMAKE_C_FLAGS}")
271-
SET(CMAKE_EXE_LINKER_FLAGS "-pg ${CMAKE_EXE_LINKER_FLAGS}")
272-
ENDIF ()
273267
ENDIF()
274268

275269
# Ensure that MinGW provides the correct header files.

0 commit comments

Comments
 (0)