summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorIvan Zhakov <ivan@apache.org>2023-05-15 14:29:21 +0000
committerIvan Zhakov <ivan@apache.org>2023-05-15 14:29:21 +0000
commitd8876f29952612994f2eb855e49767a9501e0ffe (patch)
tree6450c2a05364be76a53231f94f023796917ba29b /CMakeLists.txt
parent711ea8faf439619cf4f7fadeb77d16d49b18621f (diff)
downloadapr-1.8.x.tar.gz
On 1.8.x branch: Merge 1902628 and 1902629 from trunk:1.8.x
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/branches/1.8.x@1909837 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4baf099cc..765f41d98 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,6 +262,12 @@ SET(APR_TEST_SUITES
SET(install_targets)
SET(install_bin_pdb)
+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()
+
# libapr-1 is shared, apr-1 is static
ADD_LIBRARY(libapr-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libapr.rc)
SET(install_targets ${install_targets} libapr-1)