mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Add native arch compilation option.
This commit is contained in:
parent
09e8560e38
commit
e719a8de0f
1 changed files with 7 additions and 0 deletions
|
@ -18,6 +18,9 @@ option(OPENAL
|
|||
option(FFMPEG
|
||||
"Use FMPEG to render Bink videos" ON)
|
||||
|
||||
option(ONATIVE
|
||||
"Optimize for the host CPU" OFF)
|
||||
|
||||
if(UNIX)
|
||||
set(OPENAL TRUE)
|
||||
endif()
|
||||
|
@ -68,6 +71,10 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
set(my_warn_flags "${my_warn_flags} -Wno-local-type-template-args -Wno-unknown-warning-option -Wno-inline-new-delete")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING AND ONATIVE)
|
||||
add_definitions(-march=native)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -O0 -ggdb -fno-strict-aliasing ${my_warn_flags}")
|
||||
#set(CMAKE_C_FLAGS_DEBUGALL "${CMAKE_C_FLAGS_DEBUGALL} -g -ggdb -D_DEBUG -fno-strict-aliasing ${my_warn_flags}")
|
||||
#set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} -g -ggdb -D_DEBUG -O1 -fno-omit-frame-pointer -fno-strict-aliasing ${my_warn_flags}")
|
||||
|
|
Loading…
Reference in a new issue