dependencies cleanup
move gmock/gtest to third party Change-Id: I96b43a3de2b6f2151659a9b2eed27eb58db5ce48 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
parent
33fee15711
commit
10e5b71111
|
@ -93,24 +93,6 @@ if(MSVC)
|
||||||
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASEINTERNAL "${CMAKE_CXX_FLAGS_RELEASEINTERNAL}")
|
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASEINTERNAL "${CMAKE_CXX_FLAGS_RELEASEINTERNAL}")
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
|
||||||
if(NOT GTEST_SRC_DIR)
|
|
||||||
set(GTEST_SRC_DIR_tmp "${CMAKE_SOURCE_DIR}/../gtest")
|
|
||||||
get_filename_component(GTEST_SRC_DIR ${GTEST_SRC_DIR_tmp} ABSOLUTE)
|
|
||||||
set(GMOCK_SRC_DIR_tmp "${CMAKE_SOURCE_DIR}/../gmock")
|
|
||||||
get_filename_component(GMOCK_SRC_DIR ${GMOCK_SRC_DIR_tmp} ABSOLUTE)
|
|
||||||
else(NOT GTEST_SRC_DIR)
|
|
||||||
get_filename_component(GTEST_SRC_DIR ${GTEST_SRC_DIR} ABSOLUTE)
|
|
||||||
set(GMOCK_SRC_DIR_tmp "${GTEST_SRC_DIR}/../gmock")
|
|
||||||
get_filename_component(GMOCK_SRC_DIR ${GMOCK_SRC_DIR_tmp} ABSOLUTE)
|
|
||||||
endif(NOT GTEST_SRC_DIR)
|
|
||||||
set(GTEST_INCLUDE_DIR "${GTEST_SRC_DIR}/include")
|
|
||||||
set(GMOCK_INCLUDE_DIR "${GMOCK_SRC_DIR}/include")
|
|
||||||
message(STATUS "Google Test source dir: ${GTEST_SRC_DIR}")
|
|
||||||
message(STATUS "Google Mock source dir: ${GMOCK_SRC_DIR}")
|
|
||||||
add_subdirectory(${GMOCK_SRC_DIR} ${IGDRCL_BINARY_DIR}/gmock)
|
|
||||||
set_target_properties(gtest PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)
|
|
||||||
set_target_properties(gmock PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
set(NEO_BITS "64")
|
set(NEO_BITS "64")
|
||||||
set(NEO_ARCH "x64")
|
set(NEO_ARCH "x64")
|
||||||
|
@ -280,6 +262,8 @@ else()
|
||||||
message(STATUS "Instrumentation library name: ${INSTRUMENTATION_LIB_NAME}")
|
message(STATUS "Instrumentation library name: ${INSTRUMENTATION_LIB_NAME}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(third_party/gtest)
|
||||||
|
|
||||||
add_definitions(-DGMM_OCL)
|
add_definitions(-DGMM_OCL)
|
||||||
|
|
||||||
# We want to organize our IDE targets into folders
|
# We want to organize our IDE targets into folders
|
||||||
|
|
|
@ -19,8 +19,6 @@ You may obtain a copy of the License at: https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
* GmmLib - https://github.com/intel/gmmlib
|
* GmmLib - https://github.com/intel/gmmlib
|
||||||
* Intel Graphics Compiler - https://github.com/intel/intel-graphics-compiler
|
* Intel Graphics Compiler - https://github.com/intel/intel-graphics-compiler
|
||||||
* Google Test v1.7.0 - https://github.com/google/googletest
|
|
||||||
* Google Mock v1.7.0 - https://github.com/google/googlemock
|
|
||||||
* Khronos OpenCL Headers - https://github.com/KhronosGroup/OpenCL-Headers
|
* Khronos OpenCL Headers - https://github.com/KhronosGroup/OpenCL-Headers
|
||||||
|
|
||||||
## Optional dependencies
|
## Optional dependencies
|
||||||
|
|
|
@ -23,8 +23,6 @@ sudo /usr/sbin/alternatives --install /usr/bin/cmake cmake /usr/bin/cmake3 50
|
||||||
|- llvm_patches https://github.com/intel/llvm-patches
|
|- llvm_patches https://github.com/intel/llvm-patches
|
||||||
|- llvm_source https://github.com/llvm-mirror/llvm
|
|- llvm_source https://github.com/llvm-mirror/llvm
|
||||||
|- gmmlib https://github.com/intel/gmmlib
|
|- gmmlib https://github.com/intel/gmmlib
|
||||||
|- gmock https://github.com/google/googlemock
|
|
||||||
|- gtest https://github.com/google/googletest
|
|
||||||
|- igc https://github.com/intel/intel-graphics-compiler
|
|- igc https://github.com/intel/intel-graphics-compiler
|
||||||
|- khronos https://github.com/KhronosGroup/OpenCL-Headers
|
|- khronos https://github.com/KhronosGroup/OpenCL-Headers
|
||||||
|- neo https://github.com/intel/compute-runtime
|
|- neo https://github.com/intel/compute-runtime
|
||||||
|
@ -38,8 +36,6 @@ git clone https://github.com/intel/opencl-clang common_clang
|
||||||
git clone https://github.com/intel/llvm-patches llvm_patches
|
git clone https://github.com/intel/llvm-patches llvm_patches
|
||||||
git clone -b release_40 https://github.com/llvm-mirror/llvm llvm_source
|
git clone -b release_40 https://github.com/llvm-mirror/llvm llvm_source
|
||||||
git clone https://github.com/intel/gmmlib gmmlib
|
git clone https://github.com/intel/gmmlib gmmlib
|
||||||
git clone -b release-1.7.0 https://github.com/google/googlemock gmock
|
|
||||||
git clone -b release-1.7.0 https://github.com/google/googletest gtest
|
|
||||||
git clone https://github.com/intel/intel-graphics-compiler igc
|
git clone https://github.com/intel/intel-graphics-compiler igc
|
||||||
git clone https://github.com/KhronosGroup/OpenCL-Headers khronos
|
git clone https://github.com/KhronosGroup/OpenCL-Headers khronos
|
||||||
git clone https://github.com/intel/compute-runtime neo
|
git clone https://github.com/intel/compute-runtime neo
|
||||||
|
|
|
@ -22,8 +22,6 @@ See [LIMITATIONS.md](https://github.com/intel/compute-runtime/blob/master/docume
|
||||||
|- llvm_patches https://github.com/intel/llvm-patches
|
|- llvm_patches https://github.com/intel/llvm-patches
|
||||||
|- llvm_source https://github.com/llvm-mirror/llvm
|
|- llvm_source https://github.com/llvm-mirror/llvm
|
||||||
|- gmmlib https://github.com/intel/gmmlib
|
|- gmmlib https://github.com/intel/gmmlib
|
||||||
|- gmock https://github.com/google/googlemock
|
|
||||||
|- gtest https://github.com/google/googletest
|
|
||||||
|- igc https://github.com/intel/intel-graphics-compiler
|
|- igc https://github.com/intel/intel-graphics-compiler
|
||||||
|- khronos https://github.com/KhronosGroup/OpenCL-Headers
|
|- khronos https://github.com/KhronosGroup/OpenCL-Headers
|
||||||
|- neo https://github.com/intel/compute-runtime
|
|- neo https://github.com/intel/compute-runtime
|
||||||
|
@ -37,8 +35,6 @@ git clone https://github.com/intel/opencl-clang common_clang
|
||||||
git clone https://github.com/intel/llvm-patches llvm_patches
|
git clone https://github.com/intel/llvm-patches llvm_patches
|
||||||
git clone -b release_40 https://github.com/llvm-mirror/llvm llvm_source
|
git clone -b release_40 https://github.com/llvm-mirror/llvm llvm_source
|
||||||
git clone https://github.com/intel/gmmlib gmmlib
|
git clone https://github.com/intel/gmmlib gmmlib
|
||||||
git clone -b release-1.7.0 https://github.com/google/googlemock gmock
|
|
||||||
git clone -b release-1.7.0 https://github.com/google/googletest gtest
|
|
||||||
git clone https://github.com/intel/intel-graphics-compiler igc
|
git clone https://github.com/intel/intel-graphics-compiler igc
|
||||||
git clone https://github.com/KhronosGroup/OpenCL-Headers khronos
|
git clone https://github.com/KhronosGroup/OpenCL-Headers khronos
|
||||||
git clone https://github.com/intel/compute-runtime neo
|
git clone https://github.com/intel/compute-runtime neo
|
||||||
|
|
|
@ -6,20 +6,6 @@ components:
|
||||||
repository: https://github.com/intel/gmmlib.git
|
repository: https://github.com/intel/gmmlib.git
|
||||||
revision: a5015343bc932e39747c57ea5dec0cbf28685465
|
revision: a5015343bc932e39747c57ea5dec0cbf28685465
|
||||||
type: git
|
type: git
|
||||||
gmock:
|
|
||||||
branch: master
|
|
||||||
clean_on_sync: true
|
|
||||||
dest_dir: gmock
|
|
||||||
repository: https://github.com/google/googlemock.git
|
|
||||||
revision: c440c8fafc6f60301197720617ce64028e09c79d
|
|
||||||
type: git
|
|
||||||
gtest:
|
|
||||||
branch: master
|
|
||||||
clean_on_sync: true
|
|
||||||
dest_dir: gtest
|
|
||||||
repository: https://github.com/google/googletest.git
|
|
||||||
revision: c99458533a9b4c743ed51537e25989ea55944908
|
|
||||||
type: git
|
|
||||||
igc:
|
igc:
|
||||||
branch: igc
|
branch: igc
|
||||||
clean_on_sync: true
|
clean_on_sync: true
|
||||||
|
@ -31,7 +17,7 @@ components:
|
||||||
branch: infra
|
branch: infra
|
||||||
clean_on_sync: true
|
clean_on_sync: true
|
||||||
dest_dir: infra
|
dest_dir: infra
|
||||||
revision: 3e03c6a5e6a12c1bbf8fd276fc00cd3c5ea806f1
|
revision: c174a6eaf351ae68abbc285c837ab29c7544fcfc
|
||||||
type: git
|
type: git
|
||||||
internal:
|
internal:
|
||||||
branch: master
|
branch: master
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
Checks: '-*'
|
||||||
|
...
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Copyright (c) 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"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
# OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
add_library(gmock-gtest STATIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/gmock-gtest-all.cc
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/gtest/gtest.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/gmock/gmock.h
|
||||||
|
)
|
||||||
|
target_include_directories(gmock-gtest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
# GoogleTest and GoogleMock libraries
|
||||||
|
|
||||||
|
Version used 1.7.0
|
||||||
|
|
||||||
|
## Generating
|
||||||
|
|
||||||
|
To create required files:
|
||||||
|
|
||||||
|
* clone version 1.7.0 of googlemock (https://github.com/google/googlemock)
|
||||||
|
* go to gtest folder
|
||||||
|
* clone version 1.7.0 of googletest (https://github.com/google/googlemock)
|
||||||
|
* create output directory and run python script to create fused version
|
||||||
|
```
|
||||||
|
git clone -b release-1.7.0 https://github.com/google/googlemock gmock
|
||||||
|
cd gmock
|
||||||
|
git clone -b release-1.7.0 https://github.com/google/googletest gtest
|
||||||
|
cd scripts
|
||||||
|
mkdir /tmp/out
|
||||||
|
./fuse_gmock_files.py .. /tmp/out/
|
||||||
|
```
|
||||||
|
* output files are stored in /tmp/out
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -107,12 +107,10 @@ if(NOT SHOW_VERBOSE_UTESTS_RESULTS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(igdrcl_tests PRIVATE
|
target_include_directories(igdrcl_tests PRIVATE
|
||||||
${GTEST_INCLUDE_DIR}
|
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
${IGDRCL_SOURCE_DIR}/unit_tests/mocks${BRANCH_DIR_SUFFIX}
|
${IGDRCL_SOURCE_DIR}/unit_tests/mocks${BRANCH_DIR_SUFFIX}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(igdrcl_tests gtest gmock ${IGDRCL_EXTRA_LIBS})
|
target_link_libraries(igdrcl_tests gmock-gtest ${IGDRCL_EXTRA_LIBS})
|
||||||
|
|
||||||
set(BUILT_IN_KERNEL_DIR "${IGDRCL_SOURCE_DIR}/runtime/built_ins")
|
set(BUILT_IN_KERNEL_DIR "${IGDRCL_SOURCE_DIR}/runtime/built_ins")
|
||||||
|
|
||||||
|
|
|
@ -36,11 +36,6 @@ set_target_properties(igdrcl_aub_tests PROPERTIES FOLDER ${TEST_PROJECTS_FOLDER}
|
||||||
add_custom_target(run_aub_tests)
|
add_custom_target(run_aub_tests)
|
||||||
set_target_properties(run_aub_tests PROPERTIES FOLDER ${TEST_PROJECTS_FOLDER})
|
set_target_properties(run_aub_tests PROPERTIES FOLDER ${TEST_PROJECTS_FOLDER})
|
||||||
|
|
||||||
target_include_directories(igdrcl_aub_tests PRIVATE
|
|
||||||
${GTEST_INCLUDE_DIR}
|
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_include_directories(igdrcl_aub_tests PRIVATE
|
target_include_directories(igdrcl_aub_tests PRIVATE
|
||||||
${IGDRCL_SOURCE_DIR}/unit_tests/mocks${BRANCH_DIR_SUFFIX}
|
${IGDRCL_SOURCE_DIR}/unit_tests/mocks${BRANCH_DIR_SUFFIX}
|
||||||
|
@ -62,7 +57,7 @@ add_subdirectories()
|
||||||
target_link_libraries(igdrcl_aub_tests igdrcl_mocks)
|
target_link_libraries(igdrcl_aub_tests igdrcl_mocks)
|
||||||
target_link_libraries(igdrcl_aub_tests ${NEO_MOCKABLE_LIB_NAME})
|
target_link_libraries(igdrcl_aub_tests ${NEO_MOCKABLE_LIB_NAME})
|
||||||
target_link_libraries(igdrcl_aub_tests igdrcl_mocks)
|
target_link_libraries(igdrcl_aub_tests igdrcl_mocks)
|
||||||
target_link_libraries(igdrcl_aub_tests gtest gmock ${IGDRCL_EXTRA_LIBS})
|
target_link_libraries(igdrcl_aub_tests gmock-gtest ${IGDRCL_EXTRA_LIBS})
|
||||||
|
|
||||||
target_include_directories(igdrcl_aub_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/gen_common)
|
target_include_directories(igdrcl_aub_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/gen_common)
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "unit_tests/mocks/mock_program.h"
|
#include "unit_tests/mocks/mock_program.h"
|
||||||
#include "unit_tests/helpers/debug_manager_state_restore.h"
|
#include "unit_tests/helpers/debug_manager_state_restore.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "gmock/gmock-matchers.h"
|
#include "gmock/gmock.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
using namespace OCLRT;
|
using namespace OCLRT;
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "runtime/helpers/cache_policy.h"
|
#include "runtime/helpers/cache_policy.h"
|
||||||
|
|
||||||
#include "gmock/gmock-matchers.h"
|
#include "gmock/gmock.h"
|
||||||
|
|
||||||
using namespace OCLRT;
|
using namespace OCLRT;
|
||||||
|
|
||||||
|
@ -294,4 +294,4 @@ TEST(CommandStreamReceiverSimpleTest, givenCSRWithTagAllocationSetWhenGetTagAllo
|
||||||
GraphicsAllocation allocation(reinterpret_cast<void *>(0x1000), 0x1000);
|
GraphicsAllocation allocation(reinterpret_cast<void *>(0x1000), 0x1000);
|
||||||
csr.setTagAllocation(&allocation);
|
csr.setTagAllocation(&allocation);
|
||||||
EXPECT_EQ(&allocation, csr.getTagAllocation());
|
EXPECT_EQ(&allocation, csr.getTagAllocation());
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "unit_tests/mocks/mock_context.h"
|
#include "unit_tests/mocks/mock_context.h"
|
||||||
#include "unit_tests/mocks/mock_program.h"
|
#include "unit_tests/mocks/mock_program.h"
|
||||||
|
|
||||||
#include "gmock/gmock-matchers.h"
|
#include "gmock/gmock.h"
|
||||||
|
|
||||||
using namespace OCLRT;
|
using namespace OCLRT;
|
||||||
|
|
||||||
|
|
|
@ -30,14 +30,9 @@ set(CLELFLIB_UNIT_TESTS_SRCS
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(elflib_tests ${CLELFLIB_UNIT_TESTS_SRCS})
|
add_executable(elflib_tests ${CLELFLIB_UNIT_TESTS_SRCS})
|
||||||
target_link_libraries(elflib_tests gtest elflib)
|
target_link_libraries(elflib_tests gmock-gtest elflib)
|
||||||
set_property(TARGET elflib_tests APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS})
|
set_property(TARGET elflib_tests APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS})
|
||||||
|
|
||||||
target_include_directories(elflib_tests PRIVATE
|
|
||||||
${GTEST_INCLUDE_DIR}
|
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_link_libraries(elflib_tests ${IGDRCL_EXTRA_LIBS})
|
target_link_libraries(elflib_tests ${IGDRCL_EXTRA_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -77,7 +77,7 @@ add_library (igdrcl_libult_cs OBJECT
|
||||||
${IGDRCL_SRCS_LIB_ULT_CS}
|
${IGDRCL_SRCS_LIB_ULT_CS}
|
||||||
)
|
)
|
||||||
target_include_directories(igdrcl_libult PRIVATE
|
target_include_directories(igdrcl_libult PRIVATE
|
||||||
${GTEST_INCLUDE_DIR}
|
$<TARGET_PROPERTY:gmock-gtest,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
)
|
)
|
||||||
|
|
||||||
set(IGDRCL_SRCS_LIB_ULT_ENV
|
set(IGDRCL_SRCS_LIB_ULT_ENV
|
||||||
|
@ -130,8 +130,7 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(igdrcl_libult_env PRIVATE
|
target_include_directories(igdrcl_libult_env PRIVATE
|
||||||
${GTEST_INCLUDE_DIR}
|
$<TARGET_PROPERTY:gmock-gtest,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
${IGDRCL_SOURCE_DIR}/unit_tests/mocks${BRANCH_DIR_SUFFIX}
|
${IGDRCL_SOURCE_DIR}/unit_tests/mocks${BRANCH_DIR_SUFFIX}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -54,12 +54,10 @@ foreach(target_name linux_tests linux_dll_tests)
|
||||||
$<TARGET_OBJECTS:igdrcl_libult>
|
$<TARGET_OBJECTS:igdrcl_libult>
|
||||||
$<TARGET_OBJECTS:igdrcl_libult_cs>
|
$<TARGET_OBJECTS:igdrcl_libult_cs>
|
||||||
)
|
)
|
||||||
target_link_libraries(igdrcl_${target_name} ${NEO_MOCKABLE_LIB_NAME} igdrcl_mocks ${IGDRCL_EXTRA_LIBS} gtest gmock)
|
target_link_libraries(igdrcl_${target_name} ${NEO_MOCKABLE_LIB_NAME} igdrcl_mocks ${IGDRCL_EXTRA_LIBS} gmock-gtest)
|
||||||
|
|
||||||
set_property(TARGET igdrcl_${target_name} APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS})
|
set_property(TARGET igdrcl_${target_name} APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS})
|
||||||
target_include_directories(igdrcl_${target_name} PRIVATE
|
target_include_directories(igdrcl_${target_name} PRIVATE
|
||||||
${GTEST_INCLUDE_DIR}
|
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
${IGDRCL_SOURCE_DIR}/unit_tests/gen_common
|
${IGDRCL_SOURCE_DIR}/unit_tests/gen_common
|
||||||
${IGDRCL_SOURCE_DIR}/runtime/dll/linux/devices${BRANCH_DIR_SUFFIX}
|
${IGDRCL_SOURCE_DIR}/runtime/dll/linux/devices${BRANCH_DIR_SUFFIX}
|
||||||
)
|
)
|
||||||
|
|
|
@ -79,11 +79,10 @@ add_subdirectories()
|
||||||
|
|
||||||
add_library(igdrcl_mocks STATIC ${IGDRCL_SRCS_tests_mocks})
|
add_library(igdrcl_mocks STATIC ${IGDRCL_SRCS_tests_mocks})
|
||||||
|
|
||||||
add_dependencies(igdrcl_mocks gtest gmock)
|
# add_dependencies(igdrcl_mocks gmock-gtest)
|
||||||
|
|
||||||
target_include_directories(igdrcl_mocks PRIVATE
|
target_include_directories(igdrcl_mocks PRIVATE
|
||||||
${GTEST_INCLUDE_DIR}
|
$<TARGET_PROPERTY:gmock-gtest,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
$<TARGET_PROPERTY:${NEO_STATIC_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>
|
$<TARGET_PROPERTY:${NEO_STATIC_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
)
|
)
|
||||||
target_compile_definitions(igdrcl_mocks PRIVATE MOCKABLE_VIRTUAL=virtual $<TARGET_PROPERTY:${NEO_STATIC_LIB_NAME},INTERFACE_COMPILE_DEFINITIONS>)
|
target_compile_definitions(igdrcl_mocks PRIVATE MOCKABLE_VIRTUAL=virtual $<TARGET_PROPERTY:${NEO_STATIC_LIB_NAME},INTERFACE_COMPILE_DEFINITIONS>)
|
||||||
|
|
|
@ -39,14 +39,9 @@ MESSAGE(STATUS "GTest filter for mt tests:" ${GTEST_FILTER} )
|
||||||
|
|
||||||
target_link_libraries(igdrcl_mt_tests ${TSAN_LIB})
|
target_link_libraries(igdrcl_mt_tests ${TSAN_LIB})
|
||||||
target_link_libraries(igdrcl_mt_tests ${NEO_MOCKABLE_LIB_NAME})
|
target_link_libraries(igdrcl_mt_tests ${NEO_MOCKABLE_LIB_NAME})
|
||||||
target_link_libraries(igdrcl_mt_tests gtest gmock)
|
target_link_libraries(igdrcl_mt_tests gmock-gtest)
|
||||||
target_link_libraries(igdrcl_mt_tests igdrcl_mocks ${IGDRCL_EXTRA_LIBS})
|
target_link_libraries(igdrcl_mt_tests igdrcl_mocks ${IGDRCL_EXTRA_LIBS})
|
||||||
|
|
||||||
target_include_directories(igdrcl_mt_tests PRIVATE
|
|
||||||
${GTEST_INCLUDE_DIR}
|
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
option(SHOW_VERBOSE_UTESTS_RESULTS "Use the default/verbose test output" ON)
|
option(SHOW_VERBOSE_UTESTS_RESULTS "Use the default/verbose test output" ON)
|
||||||
|
|
||||||
if(NOT SHOW_VERBOSE_UTESTS_RESULTS)
|
if(NOT SHOW_VERBOSE_UTESTS_RESULTS)
|
||||||
|
|
|
@ -50,12 +50,10 @@ add_executable(cloc_tests ${IGDRCL_SRCS_offline_compiler_tests})
|
||||||
|
|
||||||
target_include_directories(cloc_tests PRIVATE
|
target_include_directories(cloc_tests PRIVATE
|
||||||
$<TARGET_PROPERTY:cloc,INCLUDE_DIRECTORIES>
|
$<TARGET_PROPERTY:cloc,INCLUDE_DIRECTORIES>
|
||||||
${GTEST_INCLUDE_DIR}
|
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
)
|
)
|
||||||
target_compile_definitions(cloc_tests PUBLIC MOCKABLE_VIRTUAL=virtual $<TARGET_PROPERTY:cloc,INTERFACE_COMPILE_DEFINITIONS>)
|
target_compile_definitions(cloc_tests PUBLIC MOCKABLE_VIRTUAL=virtual $<TARGET_PROPERTY:cloc,INTERFACE_COMPILE_DEFINITIONS>)
|
||||||
|
|
||||||
target_link_libraries(cloc_tests igdrcl_mocks gtest elflib)
|
target_link_libraries(cloc_tests igdrcl_mocks gmock-gtest elflib)
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_link_libraries(cloc_tests dl pthread)
|
target_link_libraries(cloc_tests dl pthread)
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "unit_tests/mocks/mock_graphics_allocation.h"
|
#include "unit_tests/mocks/mock_graphics_allocation.h"
|
||||||
#include "unit_tests/mocks/mock_kernel.h"
|
#include "unit_tests/mocks/mock_kernel.h"
|
||||||
|
|
||||||
#include "gmock/gmock-matchers.h"
|
#include "gmock/gmock.h"
|
||||||
|
|
||||||
using namespace OCLRT;
|
using namespace OCLRT;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "unit_tests/program/program_tests.h"
|
#include "unit_tests/program/program_tests.h"
|
||||||
#include "unit_tests/program/program_from_binary.h"
|
#include "unit_tests/program/program_from_binary.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "gmock/gmock-matchers.h"
|
#include "gmock/gmock.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -26,7 +26,7 @@ add_executable(igdrcl_tbx_tests
|
||||||
$<TARGET_OBJECTS:igdrcl_libult>
|
$<TARGET_OBJECTS:igdrcl_libult>
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(igdrcl_tbx_tests ${NEO_MOCKABLE_LIB_NAME} igdrcl_mocks gtest gmock ${IGDRCL_EXTRA_LIBS})
|
target_link_libraries(igdrcl_tbx_tests ${NEO_MOCKABLE_LIB_NAME} igdrcl_mocks gmock-gtest ${IGDRCL_EXTRA_LIBS})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_include_directories(igdrcl_tbx_tests PRIVATE
|
target_include_directories(igdrcl_tbx_tests PRIVATE
|
||||||
|
@ -45,11 +45,6 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(igdrcl_tbx_tests PRIVATE
|
|
||||||
${GTEST_INCLUDE_DIR}
|
|
||||||
${GMOCK_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
create_project_source_tree(igdrcl_tbx_tests ${IGDRCL_SOURCE_DIR}/runtime ${IGDRCL_SOURCE_DIR}/unit_tests)
|
create_project_source_tree(igdrcl_tbx_tests ${IGDRCL_SOURCE_DIR}/runtime ${IGDRCL_SOURCE_DIR}/unit_tests)
|
||||||
|
|
||||||
add_custom_target(run_tbx_tests ALL DEPENDS unit_tests igdrcl_tbx_tests)
|
add_custom_target(run_tbx_tests ALL DEPENDS unit_tests igdrcl_tbx_tests)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "runtime/utilities/stackvec.h"
|
#include "runtime/utilities/stackvec.h"
|
||||||
#include "unit_tests/utilities/containers_tests_helpers.h"
|
#include "unit_tests/utilities/containers_tests_helpers.h"
|
||||||
|
|
||||||
#include "gmock/gmock-matchers.h"
|
#include "gmock/gmock.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
Loading…
Reference in New Issue