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 28, 2024
1 parent 5d9f05a commit 2c178ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CheckCompilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ 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 2c178ab

Please sign in to comment.