diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | cmake/WindowsSupport.cmake | 14 |
2 files changed, 9 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 561a5de4..26acca80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,11 +137,6 @@ find_package(CMath REQUIRED) # Release support include(Release) -if(MSVC) - add_compile_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) - add_compile_options(/wd4996) -endif() - # Process subdirectories add_subdirectory(port) add_subdirectory(libtiff) diff --git a/cmake/WindowsSupport.cmake b/cmake/WindowsSupport.cmake index 8cfe7ae3..4161880c 100644 --- a/cmake/WindowsSupport.cmake +++ b/cmake/WindowsSupport.cmake @@ -23,13 +23,17 @@ # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. -# Debug postfix if(MSVC) + # Debug postfix set(CMAKE_DEBUG_POSTFIX "d") -# disable deprecation warnings - add_definitions(-D_CRT_SECURE_NO_WARNINGS) -# suppress deprecation warning for MSVC POSIX names - add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) + + # disable deprecation warnings + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) + # suppress deprecation warning for MSVC POSIX names + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) + + # Don't warn about use of deprecated functions + add_compile_options(/wd4996) endif() # Win32 file I/O |