commit b9aafb85e6daf9ba141baad92d7eb0ef893a4c21
parent 42aeb5c5b18af1362362a2e6bdf10a2a4ec70f0f
Author: Dundar Göc <gocdundar@gmail.com>
Date: Fri, 26 Aug 2022 14:30:55 +0200
build: replace deprecated CMAKE_COMPILER_IS_GNUCC variable
Instead use the recommended form `CMAKE_C_COMPILER_ID MATCHES "GNU"`
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -96,7 +96,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# Work around some old, broken detection by CMake for knowing when to use the
# isystem flag. Apple's compilers have supported this for quite some time
# now.
- if(CMAKE_COMPILER_IS_GNUCC)
+ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
endif()
endif()
@@ -170,7 +170,7 @@ if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3")
string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
endif()
-if(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_C_COMPILER_ID MATCHES "GNU")
check_c_compiler_flag(-Og HAS_OG_FLAG)
else()
set(HAS_OG_FLAG 0)