Tweak test projects so the console window remains open (#2380)

* tweak test projects so the console window remains open

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* doing it for all test projects

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* newline at the end of the file to make devs happy

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-07-28 14:48:06 -07:00
committed by GitHub
parent d95687d78c
commit 0040c7fd9b
3 changed files with 31 additions and 1 deletions
+9
View File
@@ -219,8 +219,17 @@ function(ly_add_test)
VS_DEBUGGER_COMMAND_ARGUMENTS "${test_arguments_line}"
)
# In the case where we are creating a custom target, we need to add dependency to the target
if(ly_add_test_PARENT_NAME AND NOT ${ly_add_test_NAME} STREQUAL ${ly_add_test_PARENT_NAME})
ly_add_dependencies(${unaliased_test_name} ${ly_add_test_PARENT_NAME})
endif()
endif()
# 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")
# Include additional dependencies
if (ly_add_test_RUNTIME_DEPENDENCIES)
ly_add_dependencies(${unaliased_test_name} ${ly_add_test_RUNTIME_DEPENDENCIES})
+6 -1
View File
@@ -17,7 +17,12 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
<!-- We pass the external flags directly since CMake did not support it. Once the minimal version of CMake
handles external headers in MSVC, we can remove that code and this
-->
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<!-- Continue scanning upwards to pick up all Directory.Build.props -->
<Import Condition="'@scan_above_directory_build_props@' != ''" Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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
-->
<Project>
<ItemDefinitionGroup>
<Link>
<!-- Setting test projects as "Console" so they leave the console open after they finish -->
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
</Project>