Replace deprecated CMAKE_COMPILER_IS_GNU(CC|CXX) with CMAKE_(C|CXX)_COMPILER_ID

As of CMake 3.24 CMAKE_COMPILER_IS_GNU(CC|CXX) are deprecated and should
be replaced with CMAKE_(C|CXX)_COMPILER_ID which were introduced with
CMake 2.6.
This commit is contained in:
Brad Smith 2025-05-18 18:55:04 -04:00 committed by Daniel Black
commit 6409e43177
9 changed files with 17 additions and 17 deletions

View file

@ -326,7 +326,7 @@ else()
if(WITH_DEBUG)
set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "SAFE_MUTEX")
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(MRN_C_COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS} -g3 -O0")
set(MRN_CXX_COMPILE_FLAGS "${MRN_CXX_COMPILE_FLAGS} -g3 -O0")
endif()
@ -353,7 +353,7 @@ else()
COMPILE_DEFINITIONS "MY_PTHREAD_FASTMUTEX")
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wall")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wextra")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-parameter")