Skip to content

Commit

Permalink
Fix windows tests build and multi workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit committed Dec 10, 2024
1 parent 922da0e commit a9842e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-multi-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ jobs:
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_STATIC=1 \
-D CMAKE_INSTALL_PREFIX=${{ matrix.target == 'install' && '../level-zero-install' || matrix.target == 'package' && '/usr' || '' }} \
-D CPACK_OUTPUT_FILE_PREFIX=${MOUNT_TARGET}/level-zero-package \
..
Expand Down
4 changes: 4 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ target_link_libraries(
# For some reason the MSVC runtime libraries used by googletest and test
# binaries don't match, so force the test binary to use the dynamic runtime.
if(MSVC)
if (BUILD_STATIC)
target_compile_options(tests PRIVATE "/MT$<$<CONFIG:Debug>:d>")
else()
target_compile_options(tests PRIVATE "/MD$<$<CONFIG:Debug>:d>")
endif()
endif()

add_test(NAME tests_api COMMAND tests --gtest_filter=*GivenLevelZeroLoaderPresentWhenCallingzeGetLoaderVersionsAPIThenValidVersionIsReturned*)
Expand Down

0 comments on commit a9842e3

Please sign in to comment.