summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorIvan Zhakov <ivan@apache.org>2022-07-10 11:36:15 +0000
committerIvan Zhakov <ivan@apache.org>2022-07-10 11:36:15 +0000
commite699774b42243e95e316291d93099a5a91485ecc (patch)
tree1ef500da01fc02661982ace515a6344862b1d17c /CMakeLists.txt
parent10d5a8c4788f1b3f99266c83d1203112f3d9e511 (diff)
downloadapr-e699774b42243e95e316291d93099a5a91485ecc.tar.gz
win32: Move warning settings to CMakeLists.txt compile options instead of
changing them in include/apr.h: otherwise any application the uses APR gets warning settings from APR. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902628 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 666ec0671..98e5d3a25 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -484,6 +484,13 @@ SET(install_modules)
SET(install_bin_pdb)
SET(dbd_drivers)
+IF (MSVC)
+ # Ignore Microsoft's interpretation of secure development
+ # and the POSIX string handling API
+ ADD_COMPILE_DEFINITIONS(_CRT_SECURE_NO_DEPRECATE)
+ STRING(APPEND CMAKE_C_FLAGS " /wd4996")
+ENDIF()
+
# libapr-2 is shared, apr-2 is static
ADD_LIBRARY(${apr_libname} SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libapr.rc)
LIST(APPEND install_targets ${apr_libname})