From 6b13e8bfc8c600660c7ce970434f6311c6af0d04 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 7 Sep 2021 16:11:48 -0700 Subject: [PATCH] Enabling PreFast to find virtual/override issues, some better organization of files Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- cmake/LYTestWrappers.cmake | 2 +- cmake/Platform/Common/MSVC/CodeAnalysis.ruleset | 7 +++++++ cmake/Platform/Common/MSVC/Configurations_msvc.cmake | 2 +- cmake/Platform/Common/{ => MSVC}/Directory.Build.props | 3 ++- cmake/Platform/Common/{ => MSVC}/TestProject.props | 0 cmake/Platform/Common/{ => MSVC}/VisualStudio_common.cmake | 0 cmake/Platform/Windows/platform_windows_files.cmake | 6 ++++-- 7 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 cmake/Platform/Common/MSVC/CodeAnalysis.ruleset rename cmake/Platform/Common/{ => MSVC}/Directory.Build.props (91%) rename cmake/Platform/Common/{ => MSVC}/TestProject.props (100%) rename cmake/Platform/Common/{ => MSVC}/VisualStudio_common.cmake (100%) diff --git a/cmake/LYTestWrappers.cmake b/cmake/LYTestWrappers.cmake index 8e71cb3db1..f319d19763 100644 --- a/cmake/LYTestWrappers.cmake +++ b/cmake/LYTestWrappers.cmake @@ -228,7 +228,7 @@ function(ly_add_test) # For test projects that are custom targets, pass a props file that sets the project as "Console" so # it leaves the console open when it finishes - set_target_properties(${unaliased_test_name} PROPERTIES VS_USER_PROPS "${LY_ROOT_FOLDER}/cmake/Platform/Common/TestProject.props") + set_target_properties(${unaliased_test_name} PROPERTIES VS_USER_PROPS "${LY_ROOT_FOLDER}/cmake/Platform/Common/MSVC/TestProject.props") # Include additional dependencies if (ly_add_test_RUNTIME_DEPENDENCIES) diff --git a/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset b/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset new file mode 100644 index 0000000000..a612135e94 --- /dev/null +++ b/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake index f10ef844a4..c613b79d87 100644 --- a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake +++ b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake @@ -13,7 +13,7 @@ endif() unset(minimum_supported_toolset) include(cmake/Platform/Common/Configurations_common.cmake) -include(cmake/Platform/Common/VisualStudio_common.cmake) +include(cmake/Platform/Common/MSVC/VisualStudio_common.cmake) # Verify that it wasn't invoked with an unsupported target/host architecture. Currently only supports x64/x64 if(CMAKE_VS_PLATFORM_NAME AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "x64") diff --git a/cmake/Platform/Common/Directory.Build.props b/cmake/Platform/Common/MSVC/Directory.Build.props similarity index 91% rename from cmake/Platform/Common/Directory.Build.props rename to cmake/Platform/Common/MSVC/Directory.Build.props index 76e4b28922..4b82cd7048 100644 --- a/cmake/Platform/Common/Directory.Build.props +++ b/cmake/Platform/Common/MSVC/Directory.Build.props @@ -14,6 +14,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT @VCPKG_CONFIGURATION_MAPPING@ false + @LY_ROOT_FOLDER@\cmake\Platform\Common\MSVC\CodeAnalysis.ruleset @@ -25,4 +26,4 @@ SPDX-License-Identifier: Apache-2.0 OR MIT - \ No newline at end of file + diff --git a/cmake/Platform/Common/TestProject.props b/cmake/Platform/Common/MSVC/TestProject.props similarity index 100% rename from cmake/Platform/Common/TestProject.props rename to cmake/Platform/Common/MSVC/TestProject.props diff --git a/cmake/Platform/Common/VisualStudio_common.cmake b/cmake/Platform/Common/MSVC/VisualStudio_common.cmake similarity index 100% rename from cmake/Platform/Common/VisualStudio_common.cmake rename to cmake/Platform/Common/MSVC/VisualStudio_common.cmake diff --git a/cmake/Platform/Windows/platform_windows_files.cmake b/cmake/Platform/Windows/platform_windows_files.cmake index a1e26bd992..fcc47ab6eb 100644 --- a/cmake/Platform/Windows/platform_windows_files.cmake +++ b/cmake/Platform/Windows/platform_windows_files.cmake @@ -7,10 +7,12 @@ # set(FILES - ../Common/Directory.Build.props - ../Common/VisualStudio_common.cmake ../Common/Configurations_common.cmake ../Common/MSVC/Configurations_msvc.cmake + ../Common/MSVC/CodeAnalysis.ruleset + ../Common/MSVC/Directory.Build.props + ../Common/MSVC/TestProject.props + ../Common/MSVC/VisualStudio_common.cmake ../Common/Install_common.cmake ../Common/LYWrappers_default.cmake ../Common/TargetIncludeSystemDirectories_unsupported.cmake