From bbf00a6231759f4a6426d6c28be723a915c3a02b Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Wed, 26 Aug 2020 22:20:34 -0600 Subject: [PATCH] Cleanup: Fix build warning with MSVC and OSL OSL requires RTTI to be off, this is done with the /GR- flag for MSVC, however /GR is in the default CXX flags leading to warning D9025 : overriding '/GR' with '/GR-' which cannot be suppressed. /GR is on by default and this flag is not required, so removing it from the default CXX flags makes it possible later use /GR- without generating warnings. --- build_files/cmake/platform/platform_win32.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index b8af2dfc961..007f77a583f 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -136,6 +136,13 @@ add_definitions( # MSVC11 needs _ALLOW_KEYWORD_MACROS to build add_definitions(-D_ALLOW_KEYWORD_MACROS) +# RTTI is on by default even without this switch +# however having it in the CXX Flags makes it difficult +# to remove for individual files that want to disable it +# using the /GR- flag without generating a build warning +# that both /GR and /GR- are specified. +remove_cc_flag("/GR") + # We want to support Windows 7 level ABI add_definitions(-D_WIN32_WINNT=0x601) include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)