Skip to content

Commit

Permalink
CMake: Define _CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_WARNINGS when
Browse files Browse the repository at this point in the history
compiling using MSVC.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920384 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 2, 2024
1 parent fc5a4d4 commit b0b8cde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ SET(dbd_drivers)

# Note: The WINNT definition on some targets is used only by libaprutil.rc.

IF (MSVC)
# Ignore Microsoft's interpretation of secure development
# and the POSIX string handling API
ADD_COMPILE_DEFINITIONS(_CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_WARNINGS)
ENDIF()

# libaprutil-1 is shared, aprutil-1 is static
ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc)
SET(install_targets ${install_targets} libaprutil-1)
Expand Down

0 comments on commit b0b8cde

Please sign in to comment.