Commit f324fe59 by Nicolas Capens Committed by Nicolas Capens

Move CMake build targets for PowerVR samples before unit tests

This refactoring is part of a hack which will allow us to add glslang for use by unit tests and benchmarks, but skip it when PowerVR already provides glslang. Bug: b/158655757 Change-Id: I1991ea5ea7524ba71ce9bc2c1d55114318ba434f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45648 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
parent f59cdf2e
......@@ -732,28 +732,6 @@ endif()
# Sample programs and tests
###########################################################
if(SWIFTSHADER_BUILD_TESTS)
add_subdirectory(${TESTS_DIR}/ReactorUnitTests) # Add ReactorUnitTests target
add_subdirectory(${TESTS_DIR}/GLESUnitTests) # Add gles-unittests target
add_subdirectory(${TESTS_DIR}/MathUnitTests) # Add math-unittests target
add_subdirectory(${TESTS_DIR}/SystemUnitTests) # Add system-unittests target
endif()
if(SWIFTSHADER_BUILD_BENCHMARKS)
if (NOT TARGET benchmark::benchmark)
set(BENCHMARK_ENABLE_TESTING FALSE CACHE BOOL FALSE FORCE)
add_subdirectory(${THIRD_PARTY_DIR}/benchmark)
endif()
add_subdirectory(${TESTS_DIR}/ReactorBenchmarks) # Add ReactorBenchmarks target
add_subdirectory(${TESTS_DIR}/SystemBenchmarks) # Add system-benchmarks target
add_subdirectory(${TESTS_DIR}/VulkanBenchmarks) # Add VulkanBenchmarks target
endif()
if(SWIFTSHADER_BUILD_TESTS AND SWIFTSHADER_BUILD_VULKAN)
add_subdirectory(${TESTS_DIR}/VulkanUnitTests) # Add VulkanUnitTests target
endif()
if(HAVE_PVR_SUBMODULE AND SWIFTSHADER_BUILD_PVR)
if(UNIX AND NOT APPLE)
set(PVR_WINDOW_SYSTEM XCB)
......@@ -872,3 +850,25 @@ if(HAVE_PVR_SUBMODULE AND SWIFTSHADER_BUILD_PVR)
set_target_properties(${pvr_target} PROPERTIES FOLDER Samples/PowerVR-Build)
endforeach()
endif()
if(SWIFTSHADER_BUILD_TESTS)
add_subdirectory(${TESTS_DIR}/ReactorUnitTests) # Add ReactorUnitTests target
add_subdirectory(${TESTS_DIR}/GLESUnitTests) # Add gles-unittests target
add_subdirectory(${TESTS_DIR}/MathUnitTests) # Add math-unittests target
add_subdirectory(${TESTS_DIR}/SystemUnitTests) # Add system-unittests target
endif()
if(SWIFTSHADER_BUILD_BENCHMARKS)
if (NOT TARGET benchmark::benchmark)
set(BENCHMARK_ENABLE_TESTING FALSE CACHE BOOL FALSE FORCE)
add_subdirectory(${THIRD_PARTY_DIR}/benchmark)
endif()
add_subdirectory(${TESTS_DIR}/ReactorBenchmarks) # Add ReactorBenchmarks target
add_subdirectory(${TESTS_DIR}/SystemBenchmarks) # Add system-benchmarks target
add_subdirectory(${TESTS_DIR}/VulkanBenchmarks) # Add VulkanBenchmarks target
endif()
if(SWIFTSHADER_BUILD_TESTS AND SWIFTSHADER_BUILD_VULKAN)
add_subdirectory(${TESTS_DIR}/VulkanUnitTests) # Add VulkanUnitTests target
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment