mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-30 04:41:51 +02:00
Only set flags on compilers that recognize them
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -34,11 +34,14 @@ set(TEST_INCLUDES
|
|||||||
|
|
||||||
# Suppress warnings that fire in generated stubs / vendored code and in the
|
# Suppress warnings that fire in generated stubs / vendored code and in the
|
||||||
# mud sources when compiled outside their normal full-build context.
|
# mud sources when compiled outside their normal full-build context.
|
||||||
set(TEST_CFLAGS
|
set(TEST_CFLAGS)
|
||||||
-Wno-unused-parameter
|
if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
|
||||||
-Wno-unused-function
|
list(APPEND TEST_CFLAGS
|
||||||
-Wno-unused-variable
|
-Wno-unused-parameter
|
||||||
)
|
-Wno-unused-function
|
||||||
|
-Wno-unused-variable
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Helper macro: add_mud_test(name SRC1 [SRC2 …])
|
# Helper macro: add_mud_test(name SRC1 [SRC2 …])
|
||||||
# Creates an executable, registers it with CTest.
|
# Creates an executable, registers it with CTest.
|
||||||
|
|||||||
Reference in New Issue
Block a user