File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ endif()
5252
5353include (FetchContent )
5454
55- if (BUILD_L0_LOADER_TESTS AND ( NOT MSVC OR ( MSVC AND NOT BUILD_STATIC)) )
55+ if (BUILD_L0_LOADER_TESTS)
5656 FetchContent_Declare (
5757 googletest
5858 GIT_REPOSITORY https://github.com/google/googletest.git
@@ -61,11 +61,6 @@ if(BUILD_L0_LOADER_TESTS AND (NOT MSVC OR (MSVC AND NOT BUILD_STATIC)))
6161 add_library (GTest::GTest INTERFACE IMPORTED )
6262 target_link_libraries (GTest::GTest INTERFACE gtest_main )
6363
64- # For Windows: Prevent overriding the parent project's compiler/linker settings
65- if (MSVC )
66- set (gtest_force_shared_crt ON CACHE BOOL "" FORCE )
67- endif ()
68-
6964 FetchContent_MakeAvailable (googletest)
7065
7166 enable_testing ()
@@ -229,7 +224,7 @@ set(TARGET_LOADER_NAME ze_loader)
229224add_subdirectory (source )
230225add_subdirectory (samples )
231226
232- if (BUILD_L0_LOADER_TESTS AND ( NOT MSVC OR ( MSVC AND NOT BUILD_STATIC)) )
227+ if (BUILD_L0_LOADER_TESTS)
233228 include (CTest )
234229 add_subdirectory (test )
235230endif ()
Original file line number Diff line number Diff line change @@ -13,12 +13,6 @@ target_link_libraries(
1313 ${TARGET_LOADER_NAME}
1414)
1515
16- # For some reason the MSVC runtime libraries used by googletest and test
17- # binaries don't match, so force the test binary to use the dynamic runtime.
18- if (MSVC )
19- target_compile_options (tests PRIVATE "/MD$<$<CONFIG :Debug >:d >" )
20- endif ()
21-
2216add_test (NAME tests_api COMMAND tests --gtest_filter=*GivenLevelZeroLoaderPresentWhenCallingzeGetLoaderVersionsAPIThenValidVersionIsReturned* )
2317set_property (TEST tests_api PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1" )
2418add_test (NAME tests_init_gpu_all COMMAND tests --gtest_filter=*GivenLevelZeroLoaderPresentWhenCallingZeInitDriversWithGPUTypeThenExpectPassWithGPUorAllOnly* )
You can’t perform that action at this time.
0 commit comments