Skip to content

Commit

Permalink
feat(build): Refuse Visual Studio < 2015 in CMake too
Browse files Browse the repository at this point in the history
Older versions had a very dangerous snprintf().
  • Loading branch information
dwatteau committed Jan 18, 2022
1 parent 8b8fd3f commit 4ef7034
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ string(TIMESTAMP SCUMMTR_BUILD_DATE "%Y%m%d-%H%M" UTC)
include(CheckCXXCompilerFlag)

if(MSVC)
if(MSVC_VERSION LESS 1900)
message(FATAL_ERROR "Refusing to build: Visual Studio 2015 or better is required")
endif()

add_definitions(/DSCUMMTR_BUILD_DATE=\"${SCUMMTR_BUILD_DATE}\")
add_definitions(/D_CRT_SECURE_NO_WARNINGS /DWIN32_LEAN_AND_MEAN)

Expand Down

0 comments on commit 4ef7034

Please sign in to comment.