mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-18 10:45:27 +02:00
Project uses C++, so use CHECK_CXX_COMPILER_FLAG
Although this doesn't change much for our specific case, it can make a difference for some flags, so use the appropriate macro.
This commit is contained in:
@@ -209,7 +209,7 @@ endif(BUILD_SERVER)
|
|||||||
# Set some optimizations and tweaks
|
# Set some optimizations and tweaks
|
||||||
#
|
#
|
||||||
|
|
||||||
include(CheckCCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# Visual Studio
|
# Visual Studio
|
||||||
@@ -238,7 +238,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
check_c_compiler_flag("-Wno-unused-but-set-variable" HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
|
CHECK_CXX_COMPILER_FLAG("-Wno-unused-but-set-variable" HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
|
||||||
if(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
|
if(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
|
||||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-unused-but-set-variable")
|
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-unused-but-set-variable")
|
||||||
endif(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
|
endif(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
|
||||||
|
Reference in New Issue
Block a user