Skip to content

Commit 7b527c1

Browse files
committed
cmake: move deprecation definition to src/
There's no need to add the deprecation at the top-level. Our tests add deprecation explicitly.
1 parent 9f37457 commit 7b527c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ include(DefaultCFlags)
103103
# Compiler / linker flags
104104
#
105105

106-
if(DEPRECATE_HARD)
107-
add_definitions(-DGIT_DEPRECATE_HARD)
108-
endif()
109-
110106
if(NOT CMAKE_CONFIGURATION_TYPES)
111107
# Build Debug by default
112108
if(NOT CMAKE_BUILD_TYPE)

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ add_library(git2internal OBJECT)
22
set_target_properties(git2internal PROPERTIES C_STANDARD 90)
33

44

5+
if(DEPRECATE_HARD)
6+
add_definitions(-DGIT_DEPRECATE_HARD)
7+
endif()
8+
59
if(DEBUG_POOL)
610
set(GIT_DEBUG_POOL 1)
711
endif()

0 commit comments

Comments
 (0)