Skip to content

Commit

Permalink
Throw an error if any compiler except MSCV is used on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
opastushkov committed Jun 18, 2024
1 parent 5d9f05a commit a9a0e90
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CheckCompilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ endif ()
if (NOT CMAKE_CXX_COMPILER AND DEFINED CMAKE_CXX_COMPILER)
message(FATAL_ERROR "Could not find prerequisite C++ compiler")
endif ()

if (WIN32 AND NOT CMAKE_C_COMPILER_ID STREQUAL "MSVC")
message(FATAL_ERROR "Could not find prerequisite C compiler for Windows platform. MSVC is required")
endif ()

if (WIN32 AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
message(FATAL_ERROR "Could not find prerequisite C++ compiler for Windows platform. MSVC is required")
endif ()

0 comments on commit a9a0e90

Please sign in to comment.