summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--include/apr.hwc13
2 files changed, 7 insertions, 13 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})
diff --git a/include/apr.hwc b/include/apr.hwc
index 7082d43b3..a18ca8bb7 100644
--- a/include/apr.hwc
+++ b/include/apr.hwc
@@ -63,16 +63,6 @@
#pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
#endif
-/* Ignore Microsoft's interpretation of secure development
- * and the POSIX string handling API
- */
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#ifndef _CRT_SECURE_NO_DEPRECATE
-#define _CRT_SECURE_NO_DEPRECATE
-#endif
-#pragma warning(disable: 4996)
-#endif
-
/**
* @file apr.h
* @brief APR Platform Definitions
@@ -724,9 +714,6 @@ typedef int gid_t;
*/
#if defined(_MSC_VER) && _MSC_VER >= 1200
#pragma warning(pop)
-#if _MSC_VER >= 1400
-#pragma warning(disable: 4996)
-#endif
#endif
#endif /* APR_H */