diff --git a/CMakeLists.txt b/CMakeLists.txt
index 440490b..0ceb003 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,6 +54,8 @@ endif()
 
 add_library(cxxopts INTERFACE)
 
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+
 # optionally, enable unicode support using the ICU library
 set(CXXOPTS_USE_UNICODE_HELP FALSE CACHE BOOL "Use ICU Unicode library")
 if(CXXOPTS_USE_UNICODE_HELP)
