mirror of
https://github.com/neovim/neovim.git
synced 2025-10-22 17:11:49 +00:00
build: replace deprecated CMAKE_COMPILER_IS_GNUCC variable
Instead use the recommended form `CMAKE_C_COMPILER_ID MATCHES "GNU"`
This commit is contained in:
@@ -96,7 +96,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|||||||
# Work around some old, broken detection by CMake for knowing when to use the
|
# 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
|
# isystem flag. Apple's compilers have supported this for quite some time
|
||||||
# now.
|
# now.
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
|
set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
|
||||||
endif()
|
endif()
|
||||||
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}")
|
string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||||
check_c_compiler_flag(-Og HAS_OG_FLAG)
|
check_c_compiler_flag(-Og HAS_OG_FLAG)
|
||||||
else()
|
else()
|
||||||
set(HAS_OG_FLAG 0)
|
set(HAS_OG_FLAG 0)
|
||||||
|
Reference in New Issue
Block a user