Skip to content

Commit

Permalink
Merge 8654f20 into bf13bef
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrnz committed Nov 22, 2019
2 parents bf13bef + 8654f20 commit 2d83c62
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Expand Up @@ -51,6 +51,9 @@ endif()
# Make sure that we are using the compiler we support

if(WIN32)
set(CMAKE_C_COMPILER cl)
set(CMAKE_CXX_COMPILER cl)

string(REPLACE "." ";"
CMAKE_CXX_COMPILER_VERSION_LIST "${CMAKE_CXX_COMPILER_VERSION}")

Expand All @@ -63,11 +66,17 @@ if(WIN32)
message(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using MSVC 2017 on Windows...")
endif()
elseif(APPLE)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)

if( NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"
AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
message(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using (Apple) Clang on macOS...")
endif()
else()
set(CMAKE_C_COMPILER cc)
set(CMAKE_CXX_COMPILER c++)

if( NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU"
AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
message(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using GCC/G++ on Linux...")
Expand Down

0 comments on commit 2d83c62

Please sign in to comment.