Cmake refactor part 22

cleanup CMakeLists.txt files in unit_tests/aub_tests subdirectories
cleanup CMakeLists.txt files in unit_tests/mt_tests subdirectories

Change-Id: I48f05ff3348988671ed87faa0b0b8af0d4b733c4
This commit is contained in:
Mateusz Jablonski
2018-03-20 16:50:52 +01:00
committed by sys_ocldev
parent c1b5a17da0
commit 0d1e9de4ec
17 changed files with 97 additions and 122 deletions

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -18,19 +18,20 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
target_sources(igdrcl_aub_tests PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_rect_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_image_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_buffer_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_image_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_rect_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_image_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_map_image_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_buffer_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_buffer_rect_aub_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_image_aub_tests.cpp"
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/command_enqueue_fixture.h
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_rect_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_image_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_buffer_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_image_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_map_image_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_rect_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_image_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_buffer_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_buffer_rect_aub_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_image_aub_tests.cpp
)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -18,11 +18,11 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
target_sources(igdrcl_aub_tests PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_fixture.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_fixture.h"
"${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/aub_mem_dump_tests.h"
"${CMAKE_CURRENT_SOURCE_DIR}/aub_mem_dump_tests.cpp"
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_fixture.cpp
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_fixture.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/aub_mem_dump_tests.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_mem_dump_tests.cpp
)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -18,7 +18,11 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
target_sources(igdrcl_aub_tests PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/fixture_tests.cpp"
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/aub_parent_kernel_fixture.h
${CMAKE_CURRENT_SOURCE_DIR}/fixture_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hello_world_fixture.h
${CMAKE_CURRENT_SOURCE_DIR}/run_kernel_fixture.h
${CMAKE_CURRENT_SOURCE_DIR}/simple_arg_fixture.h
)

View File

@ -19,7 +19,8 @@
# OTHER DEALINGS IN THE SOFTWARE.
if(TESTS_GEN8)
target_sources(igdrcl_aub_tests PUBLIC
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/aub_tests_configuration.cpp
)
endif(TESTS_GEN8)
endif()

View File

@ -19,10 +19,8 @@
# OTHER DEALINGS IN THE SOFTWARE.
if(TESTS_GEN9)
add_subdirectory(batch_buffer)
add_subdirectory(execution_model)
add_subdirectory(skl)
target_sources(igdrcl_aub_tests PUBLIC
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/aub_tests_configuration.cpp
)
endif(TESTS_GEN9)
add_subdirectories()
endif()

View File

@ -18,7 +18,7 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
target_sources(igdrcl_aub_tests PUBLIC
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/aub_batch_buffer_tests.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_batch_buffer_tests.cpp

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -18,10 +18,7 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# We require cmake 3.2.0 or later
cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR)
target_sources(igdrcl_aub_tests PUBLIC
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_parent_kernel_tests_gen9.cpp
)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -18,9 +18,6 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# We require cmake 3.2.0 or later
cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR)
if(TESTS_SKL)
add_subdirectory(command_queue)
add_subdirectories()
endif()

View File

@ -18,10 +18,7 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# We require cmake 3.2.0 or later
cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR)
target_sources(igdrcl_aub_tests PUBLIC
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/run_kernel_aub_tests_skl.cpp
)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -18,7 +18,7 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
target_sources(igdrcl_aub_tests PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/create_image_aub_tests.cpp"
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/create_image_aub_tests.cpp
)

View File

@ -33,16 +33,6 @@ add_executable(igdrcl_mt_tests EXCLUDE_FROM_ALL
add_subdirectories()
# Setting up our local list of test files
target_sources(igdrcl_mt_tests PRIVATE
${IGDRCL_SRCS_mt_tests_api}
${IGDRCL_SRCS_mt_tests_device_queue}
${IGDRCL_SRCS_mt_tests_event}
${IGDRCL_SRCS_mt_tests_memory_manager}
${IGDRCL_SRCS_mt_tests_platform}
${IGDRCL_SRCS_mt_tests_utilities}
)
#these tests fail because of data race, set '*' after fix problem
set(GTEST_FILTER "-AsyncGPUoperations.MapBufferAfterWriteBuffer")
MESSAGE(STATUS "GTest filter for mt tests:" ${GTEST_FILTER} )
@ -50,12 +40,11 @@ MESSAGE(STATUS "GTest filter for mt tests:" ${GTEST_FILTER} )
target_link_libraries(igdrcl_mt_tests ${TSAN_LIB})
target_link_libraries(igdrcl_mt_tests ${NEO_MOCKABLE_LIB_NAME})
target_link_libraries(igdrcl_mt_tests gtest gmock)
target_link_libraries(igdrcl_mt_tests igdrcl_mocks)
target_link_libraries(igdrcl_mt_tests igdrcl_mocks ${IGDRCL_EXTRA_LIBS})
target_include_directories(igdrcl_mt_tests PRIVATE
${GTEST_INCLUDE_DIR}
${GMOCK_INCLUDE_DIR}
${GMM_INCLUDE_PATHS}
)
option(SHOW_VERBOSE_UTESTS_RESULTS "Use the default/verbose test output" ON)
@ -64,21 +53,7 @@ if(NOT SHOW_VERBOSE_UTESTS_RESULTS)
set(igdrcl_mt_tests_LISTENER_OPTION "--disable_default_listener")
endif()
if(MSVC)
target_include_directories(igdrcl_mt_tests PRIVATE
${WDK_INCLUDE_PATHS}
${GMM_INCLUDE_PATHS}
${UMKM_SHAREDDATA_INCLUDE_PATHS}
)
target_link_libraries (igdrcl_mt_tests Ws2_32.lib)
else()
target_include_directories(igdrcl_mt_tests PRIVATE
${UMKM_SHAREDDATA_INCLUDE_PATHS}
)
target_link_libraries(igdrcl_mt_tests dl pthread)
endif(MSVC)
if(MSVC)
if(WIN32)
add_dependencies(igdrcl_mt_tests mock_gdi igdrcl_tests)
endif()
@ -90,7 +65,7 @@ create_project_source_tree(igdrcl_mt_tests ${IGDRCL_SOURCE_DIR}/runtime ${IGDRCL
set_target_properties(igdrcl_mt_tests PROPERTIES FOLDER ${TEST_PROJECTS_FOLDER})
set_property(TARGET igdrcl_mt_tests APPEND_STRING PROPERTY COMPILE_FLAGS ${TSAN_FLAGS})
if(NOT MSVC)
if(NOT WIN32)
set_property(TARGET igdrcl_mt_tests APPEND_STRING PROPERTY COMPILE_FLAGS " -g")
endif()
@ -98,7 +73,7 @@ set_target_properties(run_mt_unit_tests PROPERTIES FOLDER ${TEST_PROJECTS_FOLDER
function(run_mt_tests target slices subslices eu_per_ss)
add_custom_target(run_${target}_mt_unit_tests DEPENDS igdrcl_mt_tests)
if(NOT MSVC)
if(NOT WIN32)
add_dependencies(run_${target}_mt_unit_tests copy_test_files_${target})
endif()
add_dependencies(run_mt_unit_tests run_${target}_mt_unit_tests)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -19,12 +19,13 @@
# OTHER DEALINGS IN THE SOFTWARE.
set(IGDRCL_SRCS_mt_tests_api
#local files
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
#necessary dependencies from igdrcl_tests
"${IGDRCL_SOURCE_DIR}/unit_tests/api/cl_api_tests.cpp"
"${IGDRCL_SOURCE_DIR}/unit_tests/api/cl_create_user_event_tests_mt.cpp"
"${IGDRCL_SOURCE_DIR}/unit_tests/api/cl_get_platform_ids_tests_mt.cpp"
"${IGDRCL_SOURCE_DIR}/unit_tests/api/cl_set_mem_object_destructor_callback_tests_mt.cpp"
PARENT_SCOPE
# local files
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
# necessary dependencies from igdrcl_tests
${IGDRCL_SOURCE_DIR}/unit_tests/api/cl_api_tests.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/api/cl_create_user_event_tests_mt.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/api/cl_get_platform_ids_tests_mt.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/api/cl_set_mem_object_destructor_callback_tests_mt.cpp
)
target_sources(igdrcl_mt_tests PRIVATE ${IGDRCL_SRCS_mt_tests_api})

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -19,8 +19,8 @@
# OTHER DEALINGS IN THE SOFTWARE.
set(IGDRCL_SRCS_mt_tests_device_queue
#local files
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/device_queue_mt_tests.cpp
PARENT_SCOPE
# local files
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/device_queue_mt_tests.cpp
)
target_sources(igdrcl_mt_tests PRIVATE ${IGDRCL_SRCS_mt_tests_device_queue})

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -19,9 +19,10 @@
# OTHER DEALINGS IN THE SOFTWARE.
set(IGDRCL_SRCS_mt_tests_event
#local files
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
#necessary dependencies from igdrcl_tests
"${IGDRCL_SOURCE_DIR}/unit_tests/event/user_events_tests_mt.cpp"
PARENT_SCOPE
# local files
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
# necessary dependencies from igdrcl_tests
${IGDRCL_SOURCE_DIR}/unit_tests/event/user_events_tests_mt.cpp
)
target_sources(igdrcl_mt_tests PRIVATE ${IGDRCL_SRCS_mt_tests_event})

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -19,10 +19,11 @@
# OTHER DEALINGS IN THE SOFTWARE.
set(IGDRCL_SRCS_mt_tests_memory_manager
#local files
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter_clear_queue_mt_tests.cpp
#necessary dependencies from igdrcl_tests
${IGDRCL_SOURCE_DIR}/unit_tests/memory_manager/deferred_deleter_mt_tests.cpp
PARENT_SCOPE
# local files
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter_clear_queue_mt_tests.cpp
# necessary dependencies from igdrcl_tests
${IGDRCL_SOURCE_DIR}/unit_tests/memory_manager/deferred_deleter_mt_tests.cpp
)
target_sources(igdrcl_mt_tests PRIVATE ${IGDRCL_SRCS_mt_tests_memory_manager})

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -19,9 +19,10 @@
# OTHER DEALINGS IN THE SOFTWARE.
set(IGDRCL_SRCS_mt_tests_platform
#local files
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
#necessary dependencies from igdrcl_tests
"${IGDRCL_SOURCE_DIR}/unit_tests/platform/platform_tests_mt.cpp"
PARENT_SCOPE
# local files
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
# necessary dependencies from igdrcl_tests
${IGDRCL_SOURCE_DIR}/unit_tests/platform/platform_tests_mt.cpp
)
target_sources(igdrcl_mt_tests PRIVATE ${IGDRCL_SRCS_mt_tests_platform})

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017, Intel Corporation
# Copyright (c) 2017 - 2018, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -19,9 +19,10 @@
# OTHER DEALINGS IN THE SOFTWARE.
set(IGDRCL_SRCS_mt_tests_utilities
#local files
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
#necessary dependencies from igdrcl_tests
"${CMAKE_CURRENT_SOURCE_DIR}/reference_tracked_object_tests_mt.cpp"
PARENT_SCOPE
# local files
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
# necessary dependencies from igdrcl_tests
${CMAKE_CURRENT_SOURCE_DIR}/reference_tracked_object_tests_mt.cpp
)
target_sources(igdrcl_mt_tests PRIVATE ${IGDRCL_SRCS_mt_tests_utilities})