From 40c95869528f137431151309d46c438ef54e9035 Mon Sep 17 00:00:00 2001 From: "Neil R. Spruit" Date: Fri, 15 Nov 2024 13:31:49 -0800 Subject: [PATCH] Fix windows tests build and multi workflow Signed-off-by: Neil R. Spruit --- .github/workflows/build-multi-static.yml | 1 + test/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-multi-static.yml b/.github/workflows/build-multi-static.yml index 0921e8ad..c510c5cd 100644 --- a/.github/workflows/build-multi-static.yml +++ b/.github/workflows/build-multi-static.yml @@ -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 \ .. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 361edea0..bec0404e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -14,7 +14,7 @@ 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(MSVC and not BUILD_STATIC target_compile_options(tests PRIVATE "/MD$<$:d>") endif()