fix gcc version checking after supporting higher versions of gcc

This commit is contained in:
yanghaoran 2022-04-08 16:46:06 +08:00
parent 1a2235358a
commit f310580322
1 changed files with 2 additions and 2 deletions

View File

@ -4,8 +4,8 @@ project(MindSpore)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3.0)
message(FATAL_ERROR "GCC version ${CMAKE_CXX_COMPILER_VERSION} must not be less than 7.3.0")
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.3.0)
message(WARNING "GCC version ${CMAKE_CXX_COMPILER_VERSION} is greater than 7.3.0, may cause unknown problems.")
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.4.0)
message(WARNING "GCC version ${CMAKE_CXX_COMPILER_VERSION} is greater than 9.4.0, may cause unknown problems.")
endif()
endif()