Moves LmbrCentral Test targets into a different folder to prevent MSB8028 (#6742)

* Moves Test targets into a different folder to prevent MSB8028

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

* Simplifies an if that was affecting the whole file

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2022-01-10 09:59:35 -08:00
committed by GitHub
parent 098005afbc
commit 93996bfb3f
7 changed files with 141 additions and 130 deletions
+1 -72
View File
@@ -121,75 +121,4 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
endif()
################################################################################
# Tests
################################################################################
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
ly_add_target(
NAME LmbrCentral.Mocks HEADERONLY
NAMESPACE Gem
FILES_CMAKE
lmbrcentral_mocks_files.cmake
INCLUDE_DIRECTORIES
INTERFACE
Mocks
)
ly_add_target(
NAME LmbrCentral.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
lmbrcentral_tests_files.cmake
lmbrcentral_shared_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Source
Tests
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
AZ::AzTestShared
Legacy::CryCommon
AZ::AzFramework
Gem::LmbrCentral.Static
Gem::LmbrCentral.Mocks
)
ly_add_googletest(
NAME Gem::LmbrCentral.Tests
)
if (PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_target(
NAME LmbrCentral.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
lmbrcentral_editor_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
.
Source
Tests
COMPILE_DEFINITIONS
PRIVATE
LMBR_CENTRAL_EDITOR
BUILD_DEPENDENCIES
PRIVATE
3rdParty::Qt::Gui
3rdParty::Qt::Widgets
Legacy::CryCommon
Legacy::Editor.Headers
AZ::AzTest
AZ::AzCore
AZ::AzTestShared
AZ::AzToolsFramework
AZ::AzToolsFrameworkTestCommon
AZ::AssetBuilderSDK
AZ::AzManipulatorTestFramework.Static
Gem::LmbrCentral.Static
Gem::LmbrCentral.Editor.Static
)
ly_add_googletest(
NAME Gem::LmbrCentral.Editor.Tests
)
endif()
endif()
add_subdirectory(Tests)
@@ -0,0 +1,79 @@
#
# 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
#
#
if(NOT PAL_TRAIT_BUILD_TESTS_SUPPORTED)
return()
endif()
ly_add_target(
NAME LmbrCentral.Mocks HEADERONLY
NAMESPACE Gem
FILES_CMAKE
lmbrcentral_mocks_files.cmake
INCLUDE_DIRECTORIES
INTERFACE
../Mocks
)
ly_add_target(
NAME LmbrCentral.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
lmbrcentral_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
../Source
.
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
AZ::AzTestShared
Legacy::CryCommon
AZ::AzFramework
Gem::LmbrCentral.Static
Gem::LmbrCentral.Mocks
)
ly_add_googletest(
NAME Gem::LmbrCentral.Tests
)
if (PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_target(
NAME LmbrCentral.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
lmbrcentral_editor_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
..
../Source
.
COMPILE_DEFINITIONS
PRIVATE
LMBR_CENTRAL_EDITOR
BUILD_DEPENDENCIES
PRIVATE
3rdParty::Qt::Gui
3rdParty::Qt::Widgets
Legacy::CryCommon
Legacy::Editor.Headers
AZ::AzTest
AZ::AzCore
AZ::AzTestShared
AZ::AzToolsFramework
AZ::AzToolsFrameworkTestCommon
AZ::AssetBuilderSDK
AZ::AzManipulatorTestFramework.Static
Gem::LmbrCentral.Static
Gem::LmbrCentral.Editor.Static
)
ly_add_googletest(
NAME Gem::LmbrCentral.Editor.Tests
)
endif()
@@ -0,0 +1,28 @@
#
# 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
#
#
set(FILES
LmbrCentralEditorTest.cpp
LmbrCentralReflectionTest.h
LmbrCentralReflectionTest.cpp
EditorBoxShapeComponentTests.cpp
EditorSphereShapeComponentTests.cpp
EditorCapsuleShapeComponentTests.cpp
EditorCompoundShapeComponentTests.cpp
EditorCylinderShapeComponentTests.cpp
EditorPolygonPrismShapeComponentTests.cpp
EditorTubeShapeComponentTests.cpp
SpawnerComponentTest.cpp
Builders/CopyDependencyBuilderTest.cpp
Builders/SliceBuilderTests.cpp
Builders/LevelBuilderTest.cpp
Builders/LuaBuilderTests.cpp
Builders/SeedBuilderTests.cpp
../Source/LmbrCentral.cpp
../Source/LmbrCentralEditor.cpp
)
@@ -7,5 +7,5 @@
#
set(FILES
Mocks/LmbrCentral/Shape/MockShapes.h
../Mocks/LmbrCentral/Shape/MockShapes.h
)
@@ -0,0 +1,32 @@
#
# 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
#
#
set(FILES
AudioComponentTests.cpp
AxisAlignedBoxShapeTest.cpp
BoxShapeTest.cpp
BundlingSystemComponentTests.cpp
SphereShapeTest.cpp
CylinderShapeTest.cpp
CapsuleShapeTest.cpp
PolygonPrismShapeTest.cpp
QuadShapeTest.cpp
TubeShapeTest.cpp
LmbrCentralReflectionTest.h
LmbrCentralReflectionTest.cpp
LmbrCentralTest.cpp
ShapeGeometryUtilTest.cpp
SpawnerComponentTest.cpp
SplineComponentTests.cpp
DiskShapeTest.cpp
ReferenceShapeTests.cpp
../Source/LmbrCentral.cpp
../Source/Ai/NavigationComponent.cpp
../Source/Scripting/SpawnerComponent.cpp
../Source/Shape/TubeShape.cpp
)
@@ -1,28 +0,0 @@
#
# 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
#
#
set(FILES
Tests/LmbrCentralEditorTest.cpp
Tests/LmbrCentralReflectionTest.h
Tests/LmbrCentralReflectionTest.cpp
Tests/EditorBoxShapeComponentTests.cpp
Tests/EditorSphereShapeComponentTests.cpp
Tests/EditorCapsuleShapeComponentTests.cpp
Tests/EditorCompoundShapeComponentTests.cpp
Tests/EditorCylinderShapeComponentTests.cpp
Tests/EditorPolygonPrismShapeComponentTests.cpp
Tests/EditorTubeShapeComponentTests.cpp
Tests/SpawnerComponentTest.cpp
Tests/Builders/CopyDependencyBuilderTest.cpp
Tests/Builders/SliceBuilderTests.cpp
Tests/Builders/LevelBuilderTest.cpp
Tests/Builders/LuaBuilderTests.cpp
Tests/Builders/SeedBuilderTests.cpp
Source/LmbrCentral.cpp
Source/LmbrCentralEditor.cpp
)
@@ -1,29 +0,0 @@
#
# 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
#
#
set(FILES
Tests/AudioComponentTests.cpp
Tests/AxisAlignedBoxShapeTest.cpp
Tests/BoxShapeTest.cpp
Tests/BundlingSystemComponentTests.cpp
Tests/SphereShapeTest.cpp
Tests/CylinderShapeTest.cpp
Tests/CapsuleShapeTest.cpp
Tests/PolygonPrismShapeTest.cpp
Tests/QuadShapeTest.cpp
Tests/TubeShapeTest.cpp
Tests/LmbrCentralReflectionTest.h
Tests/LmbrCentralReflectionTest.cpp
Tests/LmbrCentralTest.cpp
Tests/ShapeGeometryUtilTest.cpp
Tests/SpawnerComponentTest.cpp
Tests/SplineComponentTests.cpp
Tests/DiskShapeTest.cpp
Tests/ReferenceShapeTests.cpp
Source/LmbrCentral.cpp
)