Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ if(MSVC)
/sdl
/guard:cf
/GS
/DYNAMICBASE)
/DYNAMICBASE
# c2pa_cpp wraps the deprecated C API surface, silence C4996 so the
# wrapper still builds cleanly while end users still see the warning.
/wd4996)

target_link_options(c2pa_cpp PRIVATE
/DYNAMICBASE
Expand All @@ -254,6 +257,10 @@ else()
-Wstack-protector
-fstack-protector-strong
-fPIC
# c2pa_cpp wraps the deprecated C API surface, silence the warning
# here so the wrapper still builds with -Werror while end users still
# see the deprecation warning.
-Wno-deprecated-declarations
)

if(APPLE)
Expand Down
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ if(WIN32)
else()
# On Unix systems, link directly to the shared library
target_link_libraries(ctest PRIVATE "${C2PA_C_LIB}")
# c-app-test deliberately exercises the deprecated C API so we can keep
# testing it. Silences the resulting -Wdeprecated-declarations so -Werror
# does not fail the (test) build.
target_compile_options(ctest PRIVATE -Wno-deprecated-declarations)
endif()
target_include_directories(ctest PRIVATE
"${C2PA_PREBUILT_INCLUDE_DIR}"
Expand Down
Loading