mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-27 00:00:35 +01:00
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> client: Remove i386 GNU assembler version of S_WriteLinearBlastStereo16() This was the last remaining GNU assembler code that was in its own independent source file, as opposed to being embedded in C code with GNU `__asm__ volatile` or MSVC `__asm` (which tends to be much easier to deal with in a modern build system). When the Quake 3 engine was originally written, this might have been an "expensive" function when written in portable C, but after 25 years of CPU development it's less likely to matter (and modern compilers might produce faster results from the C code anyway). Resolves: https://github.com/ioquake/ioq3/issues/778 Signed-off-by: Simon McVittie <smcv@debian.org>
54 lines
1.6 KiB
CMake
54 lines
1.6 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
|
|
)
|
|
|
|
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/mohaa)
|
|
endif()
|
|
|
|
add_compile_options(-Wno-comment)
|
|
# Treat no return type as error
|
|
add_compile_options(-Werror=return-type)
|
|
|
|
set(ASM_SOURCES)
|
|
|
|
execute_process(COMMAND ${CMAKE_C_COMPILER} -v
|
|
OUTPUT_VARIABLE COMPILER_OUTPUT
|
|
ERROR_VARIABLE COMPILER_OUTPUT
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
list(APPEND CLIENT_LIBRARIES m)
|
|
list(APPEND SERVER_LIBRARIES m)
|
|
|
|
if(COMPILER_OUTPUT MATCHES "musl|freebsd|openbsd|netbsd")
|
|
list(APPEND CLIENT_LIBRARIES execinfo)
|
|
list(APPEND SERVER_LIBRARIES execinfo)
|
|
elseif (NOT APPLE)
|
|
# For when using GLIBC versions older than 2.34
|
|
list(APPEND CLIENT_LIBRARIES rt)
|
|
list(APPEND SERVER_LIBRARIES rt)
|
|
endif() |