summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-02-13 23:26:54 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-02-14 11:57:05 +0000
commit24ac9e0c97ff9f20d096b4d93663276bc8bb2de1 (patch)
tree6ce5dbf9b0c70ba6ed59280d4e2adfd92fcf1a12 /examples
parente19163761d5f51f1437fd291a89adf2aaa4aa262 (diff)
downloadlibgit2-24ac9e0c97ff9f20d096b4d93663276bc8bb2de1.tar.gz
deprecation: ensure we GIT_EXTERN deprecated funcs
Although the error functions were deprecated, we did not properly mark them as deprecated. We need to include the `deprecated.h` file in order to ensure that the functions get their export attributes. Similarly, do not define `GIT_DEPRECATE_HARD` within the library, or those functions will also not get their export attributes. Define that only on the tests and examples.
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 49edaec0f..e631b96f2 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -5,6 +5,9 @@ FILE(GLOB_RECURSE SRC_EXAMPLE_GIT2 network/*.c network/*.h common.?)
ADD_EXECUTABLE(cgit2 ${SRC_EXAMPLE_GIT2})
SET_TARGET_PROPERTIES(cgit2 PROPERTIES C_STANDARD 90)
+# Ensure that we do not use deprecated functions internally
+ADD_DEFINITIONS(-DGIT_DEPRECATE_HARD)
+
IF(WIN32 OR ANDROID)
TARGET_LINK_LIBRARIES(cgit2 git2)
ELSE()