--- cmake/LIEFCompilerDetection.cmake
+++ cmake/LIEFCompilerDetection.cmake
@@ -12,13 +12,21 @@
 endif()

 if (cxx_std_14 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
-  set(LIEF_SUPPORT_CXX14 1)
+  if (${MSVC} AND ${MSVC_TOOLSET_VERSION} GREATER_EQUAL 141)
+    set(LIEF_SUPPORT_CXX14 1)
+  elseif(NOT ${MSVC})
+    set(LIEF_SUPPORT_CXX14 1)
+  endif()
 endif()

 if (cxx_std_17 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
-  set(LIEF_SUPPORT_CXX17 1)
+  if (${MSVC} AND ${MSVC_TOOLSET_VERSION} GREATER_EQUAL 142)
+    set(LIEF_SUPPORT_CXX17 1)
+  elseif(NOT ${MSVC})
+    set(LIEF_SUPPORT_CXX17 1)
+  endif()
 endif()

 configure_file(
   "${CMAKE_CURRENT_SOURCE_DIR}/src/compiler_support.h.in"
   "${CMAKE_CURRENT_BINARY_DIR}/compiler_support.h"
