From 80b8f326e08510a48aaa7411d7556baa31841bb1 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Wed, 30 Oct 2024 16:48:38 +0100 Subject: [PATCH 1/2] [ci] Re-enable MKL on windows. Works with Visual Studio 2019 only. --- scripts/ci/extends/vs2019-environment.yml | 5 +++-- scripts/ci/jobs/build-win.yml | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/ci/extends/vs2019-environment.yml b/scripts/ci/extends/vs2019-environment.yml index fc6fbcb592a..98a71d017dd 100644 --- a/scripts/ci/extends/vs2019-environment.yml +++ b/scripts/ci/extends/vs2019-environment.yml @@ -18,5 +18,6 @@ before_script: - *load_vs_env # Load MKL environment - - '& "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"' - - $env:PATH += ";C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\intel64_win\compiler" + - '& "C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\env\vars.bat"' + - '& "C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\env\vars.bat"' + - $env:PATH += ";C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\windows\redist\intel64_win\compiler" diff --git a/scripts/ci/jobs/build-win.yml b/scripts/ci/jobs/build-win.yml index dc7ff5a7828..2074a7ebf2a 100644 --- a/scripts/ci/jobs/build-win.yml +++ b/scripts/ci/jobs/build-win.yml @@ -1,16 +1,17 @@ build win: extends: - .template-build-win + # oneAPI MKL results in Stack overflow during compilation of MathLib on Visual Studio 2022 + # therefore using 2019 - .vs-environment - # oneAPI 2024 results in Stack overflow during compilation of MathLib - # - .vs-mkl-environment + - .vs-mkl-environment variables: CHECK_WARNINGS: "true" CMAKE_PRESET: release - # -DOGS_USE_MKL=ON CMAKE_ARGS: >- -DOGS_CI_TESTRUNNER_REPEAT=1 -DOGS_USE_PIP=ON + -DOGS_USE_MKL=ON build win msvc: extends: From 99a5c595cf1613a7ff6b550b84c9f43c1a1198c8 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Wed, 30 Oct 2024 16:50:12 +0100 Subject: [PATCH 2/2] [cmake] Different MSVC versions create different cpm ext project builds. Will rebuild all ext packages on msvc. --- scripts/cmake/BuildExternalProject.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/BuildExternalProject.cmake b/scripts/cmake/BuildExternalProject.cmake index 22f9d772384..4a8172c0fbe 100644 --- a/scripts/cmake/BuildExternalProject.cmake +++ b/scripts/cmake/BuildExternalProject.cmake @@ -29,7 +29,11 @@ macro(BuildExternalProject_set_build_dir target argn_string) IS_PREFIX PROJECT_BINARY_DIR "${CPM_SOURCE_CACHE}" _is_inside_build ) if(NOT _is_inside_build) - string(SHA256 _hash "${CMAKE_GENERATOR};${argn_string}") + string( + SHA256 + _hash + "${CMAKE_GENERATOR};${argn_string}${MSVC_TOOLSET_VERSION}" + ) set(build_dir "${CPM_SOURCE_CACHE}/_ext/${target}/${_hash}") endif() endif()