summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-06 16:38:11 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-11 09:03:59 -0500
commit4c308421384a5333fb0250a4a03e92cca89f4459 (patch)
treebe249493523223e9c2ad48170718d8e8e6002de1
parent02b57da1ff91e704112b0a32fcc72add8914d3a9 (diff)
downloadlibgit2-4c308421384a5333fb0250a4a03e92cca89f4459.tar.gz
cmake: move deprecation definition to src/
There's no need to add the deprecation at the top-level. Our tests add deprecation explicitly.
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/CMakeLists.txt4
2 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7f19468c..46506590e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,10 +103,6 @@ include(DefaultCFlags)
# Compiler / linker flags
#
-if(DEPRECATE_HARD)
- add_definitions(-DGIT_DEPRECATE_HARD)
-endif()
-
if(NOT CMAKE_CONFIGURATION_TYPES)
# Build Debug by default
if(NOT CMAKE_BUILD_TYPE)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index eed04f8ee..e7801165e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,6 +2,10 @@ add_library(git2internal OBJECT)
set_target_properties(git2internal PROPERTIES C_STANDARD 90)
+if(DEPRECATE_HARD)
+ add_definitions(-DGIT_DEPRECATE_HARD)
+endif()
+
if(DEBUG_POOL)
set(GIT_DEBUG_POOL 1)
endif()