diff --git a/CMake/OTBSetStandardCompilerFlags.cmake b/CMake/OTBSetStandardCompilerFlags.cmake
index 2cf8c6b1297bb9b974a704c10f4f8e9b36f2c490..c44cb79482ee4c602d2dce33d9a62250eda26a9b 100644
--- a/CMake/OTBSetStandardCompilerFlags.cmake
+++ b/CMake/OTBSetStandardCompilerFlags.cmake
@@ -144,7 +144,7 @@ macro(check_compiler_platform_flags)
           message(STATUS "The stack size is set to 10 Mbytes (/STACK:10000000).")
       endif()
     endif() #if (${CMAKE_VERSION..
-  else(MINGW)
+  elseif(MINGW)
     set(OTB_REQUIRED_LINK_FLAGS "${OTB_REQUIRED_LINK_FLAGS} -Wl,--stack,10000000")
     message(STATUS "The stack size is set to 10 Mbytes (-Wl,--stack,10000000).")
   endif() # if(MSVC)