Check compiler using CMAKE_CXX_COMPILER_ID

Since the introduction of CMAKE_COMPILER_IS_GNUCXX CMake has
suggested using CMAKE_CXX_COMPILER_ID for more general checks.
This commit is contained in:
Joel Johnson 2019-12-31 20:23:08 -07:00
parent 12ceb01485
commit 30eb5ce128

View File

@ -1,4 +1,4 @@
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
#Get compiler version.
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
OUTPUT_VARIABLE GNUCXX_VERSION