Fix compatibility problem with CMake policy CMP0025 (#2277)

Signed-off-by: Qingyao Sun <sunqingyao19970825@icloud.com>
This commit is contained in:
Qingyao Sun 2020-04-23 05:14:20 -06:00 committed by GitHub
parent 7176aee852
commit 14643643c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,7 @@ Patrick Stewart
Peter Monsson Peter Monsson
Philipp Wagner Philipp Wagner
Pieter Kapsenberg Pieter Kapsenberg
Qingyao Sun
Richard Myers Richard Myers
Sean Cross Sean Cross
Sebastien Van Cauwenberghe Sebastien Van Cauwenberghe

View File

@ -163,7 +163,9 @@ function(verilate TARGET)
endforeach() endforeach()
string(TOLOWER ${CMAKE_CXX_COMPILER_ID} COMPILER) 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) set(COMPILER gcc)
endif() endif()