mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
build: Add option to use SSE2 on 32-bit x86, and enable by default.
Fixes/works around a float comparison test failure in input transform.
This commit is contained in:
parent
172a5baf23
commit
cb65c4f236
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2018-2022, Collabora, Ltd.
|
||||
# Copyright 2018-2023, Collabora, Ltd.
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.10.2)
|
||||
|
@ -255,6 +255,7 @@ option_with_deps(XRT_FEATURE_SLAM "Enable SLAM tracking support" DEPENDS XRT_HAV
|
|||
option_with_deps(XRT_FEATURE_STEAMVR_PLUGIN "Build SteamVR plugin" DEPENDS "NOT ANDROID")
|
||||
option_with_deps(XRT_FEATURE_TRACING "Enable debug tracing on supported platforms" DEFAULT OFF DEPENDS "XRT_HAVE_PERCETTO OR XRT_HAVE_TRACY")
|
||||
option_with_deps(XRT_FEATURE_WINDOW_PEEK "Enable a window that displays the content of the HMD on screen" DEPENDS XRT_HAVE_SDL2)
|
||||
option(XRT_FEATURE_SSE2 "Build using SSE2 instructions, if building for 32-bit x86" ON)
|
||||
|
||||
if (XRT_FEATURE_SERVICE)
|
||||
# Disable the client debug gui by default for out-of-proc -
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2018-2021, Collabora, Ltd.
|
||||
# Copyright 2018-2023, Collabora, Ltd.
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
if(NOT MSVC)
|
||||
|
@ -8,6 +8,13 @@ if(NOT MSVC)
|
|||
)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter")
|
||||
|
||||
# Use effectively ubiquitous SSE2 instead of x87 floating point
|
||||
# for increased reliability/consistency
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86" AND XRT_FEATURE_SSE2)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
|
|
Loading…
Reference in a new issue