--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -353,7 +353,9 @@
 if(WINDOWS)
   list(APPEND FrontISTR_DEFINITIONS "_WINDOWS")
   list(APPEND FrontISTR_LIBRARIES "ws2_32")
+  if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-range-check")
+  endif()
 endif()
 
 
