Fix compatibility problem with CMake policy CMP0025 (#2277)

Signed-off-by: Qingyao Sun <[email protected]>
This commit is contained in:
Qingyao Sun
2020-04-23 07:14:20 -04:00
committed by GitHub
parent 7176aee852
commit 14643643c9
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -33,6 +33,7 @@ Patrick Stewart
Peter Monsson
Philipp Wagner
Pieter Kapsenberg
Qingyao Sun
Richard Myers
Sean Cross
Sebastien Van Cauwenberghe
+3 -1
View File
@@ -163,7 +163,9 @@ function(verilate TARGET)
endforeach()
string(TOLOWER ${CMAKE_CXX_COMPILER_ID} COMPILER)
if (NOT COMPILER MATCHES "msvc|clang")
if (COMPILER STREQUAL "appleclang")
set(COMPILER clang)
elseif (NOT COMPILER MATCHES "^msvc$|^clang$")
set(COMPILER gcc)
endif()