diff --git a/CMakeLists.txt b/CMakeLists.txt
index f16bc6446283535c7b5b4ec135f274e801785961..8f7435941eb96e2127995c1fcb6f82e8fb1d71c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ project(lib4neuro)
 
 #TODO rewrite to use add_compile_definitions
 if(WIN32)
-    add_compile_options("-DBOOST_ALL_NO_LIB /W0")
+    add_compile_options("-DBOOST_ALL_NO_LIB")
 else()
 	add_compile_options("-DBOOST_TEST_DYN_LINK")
 endif()
@@ -34,10 +34,15 @@ endif()
 # Setting C++ compiler flags #
 #--------------------------------#
 set(CMAKE_CXX_STANDARD 17)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
+
+#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
 
 if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" )
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost" )
+elseif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" ) 
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")
+else()
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 endif()
 
 #--------------------#