svn commit: r1920384 - /apr/apr-util/branches/1.7.x/CMakeLists.txt
| Newsgroups | gmane.comp.apache.apr.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ivan
Date: Mon Sep 2 11:02:24 2024
New Revision: 1920384
URL: http://svn.apache.org/viewvc?rev=1920384&view=rev
Log:
CMake: Define _CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_WARNINGS when
compiling using MSVC.
Modified:
apr/apr-util/branches/1.7.x/CMakeLists.txt
Modified: apr/apr-util/branches/1.7.x/CMakeLists.txt
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/CMakeLists.txt?rev=1920384&r1=1920383&r2=1920384&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/CMakeLists.txt (original)
+++ apr/apr-util/branches/1.7.x/CMakeLists.txt Mon Sep 2 11:02:24 2024
@@ -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)