From 13a5cb2286c4dd1ca412acdc12933762ab1125c2 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@bred.dog> Date: Sat, 10 Aug 2019 16:26:49 -0400 Subject: [PATCH] Add options for msvc to generate code favoring amd64 or intel64 --- indra/cmake/00-Common.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 5e62bb245d..a698d2206f 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -157,6 +157,16 @@ if (WINDOWS) add_compile_options(/arch:SSE2) endif () + option(FAVOR_AMD "Favor amd64 processors in generated code" OFF) + option(FAVOR_INTEL "Favor intel64 processors in generated code" OFF) + if(FAVOR_AMD AND FAVOR_INTEL) + message(FATAL_ERROR "Cannot enable favor intel and amd at the same time") + elseif(FAVOR_AMD) + add_compile_options(/favor:AMD64) + elseif(FAVOR_INTEL) + add_compile_options(/favor:INTEL64) + endif() + if (NOT VS_DISABLE_FATAL_WARNINGS) add_compile_options(/WX) endif (NOT VS_DISABLE_FATAL_WARNINGS) -- GitLab