mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Propagate USE_INTRINSICS through CMake
This commit is contained in:
parent
332fc8d0e7
commit
9212ed4263
2 changed files with 5 additions and 5 deletions
|
@ -40,6 +40,8 @@ set(CPU_TYPE "" CACHE STRING "When set, passes this string as CPU-ID which will
|
|||
|
||||
set(CPU_OPTIMIZATION "-mmmx -msse -msse2" CACHE STRING "Which CPU specific optimitations should be used beside the compiler's default?")
|
||||
|
||||
option(USE_INTRINSICS "Compile using intrinsics (e.g mmx, sse, msse2)" ON)
|
||||
|
||||
if(UNIX)
|
||||
set(OPENAL TRUE)
|
||||
endif()
|
||||
|
@ -71,6 +73,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
if (CPU_OPTIMIZATION)
|
||||
add_definitions(${CPU_OPTIMIZATION})
|
||||
endif()
|
||||
if (USE_INTRINSICS)
|
||||
add_definitions(-DUSE_INTRINSICS)
|
||||
endif()
|
||||
if(WIN32)
|
||||
# require msvcr70.dll or newer for _aligned_malloc etc
|
||||
# I think it is from Visual C++ .NET 2002, so it should be available on any remotely modern system.
|
||||
|
|
|
@ -29,11 +29,6 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#ifndef __SYS_INTRIINSICS_H__
|
||||
#define __SYS_INTRIINSICS_H__
|
||||
|
||||
#if defined(__x86_64__)
|
||||
// Enable this only on amd64
|
||||
#define USE_INTRINSICS
|
||||
#endif
|
||||
|
||||
#if defined(USE_INTRINSICS)
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue