Clang compile fixes (#1876)

* Fix compile error from -Wwritable-strings

Signed-off-by: Chris Burel <burelc@amazon.com>

* Fix flags used to build MaskedOcclusionCulling with clang

Signed-off-by: Chris Burel <burelc@amazon.com>

* Fix class that has a final destructor, but the class itself was not final

Signed-off-by: Chris Burel <burelc@amazon.com>
This commit is contained in:
Chris Burel
2021-07-07 14:34:45 -07:00
committed by GitHub
parent af8e6afc6a
commit 80bdd4e17b
6 changed files with 42 additions and 16 deletions
@@ -0,0 +1,18 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
ly_add_source_properties(
SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp
PROPERTY COMPILE_OPTIONS
VALUES -mavx2 -mfma -msse4.1
)
ly_add_source_properties(
SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp
PROPERTY COMPILE_OPTIONS
VALUES -mno-avx
)
@@ -0,0 +1,19 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
ly_add_source_properties(
SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp
PROPERTY COMPILE_OPTIONS
VALUES /arch:AVX2 /W3
)
ly_add_source_properties(
SOURCES
External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX512.cpp
External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp
PROPERTY COMPILE_OPTIONS
VALUES /W3
)
@@ -7,16 +7,3 @@
set (PAL_TRAIT_BUILD_ATOM_RPI_ASSETS_SUPPORTED TRUE)
set (PAL_TRAIT_BUILD_ATOM_RPI_MASKED_OCCLUSION_CULLING_SUPPORTED TRUE)
ly_add_source_properties(
SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp
PROPERTY COMPILE_OPTIONS
VALUES /arch:AVX2 /W3
)
ly_add_source_properties(
SOURCES
External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX512.cpp
External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp
PROPERTY COMPILE_OPTIONS
VALUES /W3
)