HULL/cmake/compilers/gnu.cmake
Simon McVittie 9f0280bca1 Remove unused matha.S
Before commit a7d33b1c "(bug #3639) BoxOnPlaneSide rewrite" there
was more code here, but since then the only thing left is the
Invert24To16 function, to which I couldn't find any references since
the beginning of ioquake3's git history.

Resolves: https://github.com/ioquake/ioq3/issues/774
Signed-off-by: Simon McVittie <smcv@debian.org>
2025-08-23 21:23:03 +01:00

36 lines
1.0 KiB
CMake

# GNU style (GCC/Clang) compiler specific settings
if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang$")
return()
endif()
enable_language(ASM)
set(ASM_SOURCES
${SOURCE_DIR}/asm/ftola.c
${SOURCE_DIR}/asm/snapvector.c
)
set(CLIENT_ASM_SOURCES
${SOURCE_DIR}/asm/snd_mixa.S
)
add_compile_options(-Wall -Wimplicit
-Wstrict-prototypes -Wformat=2 -Wformat-security
-Wstrict-aliasing=2 -Wmissing-format-attribute
-Wdisabled-optimization -Werror-implicit-function-declaration)
add_compile_options(-Wno-format-zero-length -Wno-format-nonliteral)
# There are lots of instances of union based aliasing in the code
# that rely on the compiler not optimising them away, so disable it
add_compile_options(-fno-strict-aliasing)
# This is necessary to hide all symbols unless explicitly exported
# via the Q_EXPORT macro
add_compile_options(-fvisibility=hidden)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX /opt/quake3)
endif()