From 9f30fd97c083a1dea1c607f7623d54b36cd4226e Mon Sep 17 00:00:00 2001 From: 3manifold <22544721+3manifold@users.noreply.github.com> Date: Fri, 18 Jul 2025 22:49:36 +0200 Subject: [PATCH 1/6] Fix incompatibility among manylinux2014 and rhel8, deprecated windows-2019, MSVC compatibility --- .github/workflows/ci.yml | 4 +- CMakeLists.txt | 3 +- .../tools/prepare_build_environment_linux.sh | 4 +- .../prepare_build_environment_windows.sh | 58 +++++++++++++++++-- 4 files changed, 60 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 197117ef2..8537c6a9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,7 +132,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2019] + os: [ubuntu-22.04, windows-2022] arch: [auto64] include: - os: ubuntu-22.04 @@ -183,7 +183,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2019] + os: [ubuntu-22.04, windows-2022] steps: - name: Set up Python 3.9 diff --git a/CMakeLists.txt b/CMakeLists.txt index 62b99d136..12dfe9188 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -688,7 +688,8 @@ endif() if(BUILD_TESTS) add_subdirectory(tests) endif() - +MESSAGE(STATUS "XXXCompiler Id: ${CMAKE_CXX_COMPILER_ID}") +MESSAGE(STATUS "XXXCompiler Version: ${CMAKE_CXX_COMPILER_VERSION}") include(GNUInstallDirs) if (BUILD_CLI) diff --git a/python/tools/prepare_build_environment_linux.sh b/python/tools/prepare_build_environment_linux.sh index 61ac171a3..c92ef4b58 100755 --- a/python/tools/prepare_build_environment_linux.sh +++ b/python/tools/prepare_build_environment_linux.sh @@ -20,7 +20,7 @@ if [ "$CIBW_ARCHS" == "aarch64" ]; then else # Install CUDA 12.2: - yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo + yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo # error mirrorlist.centos.org doesn't exists anymore. sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo @@ -29,7 +29,7 @@ else cuda-nvcc-12-2-12.2.140-1 \ cuda-cudart-devel-12-2-12.2.140-1 \ libcurand-devel-12-2-10.3.3.141-1 \ - libcudnn9-devel-cuda-12-9.1.0.70-1 \ + libcudnn9-devel-cuda-12-9.0.0.312-1 \ libcublas-devel-12-2-12.2.5.6-1 \ libnccl-devel-2.19.3-1+cuda12.2 ln -s cuda-12.2 /usr/local/cuda diff --git a/python/tools/prepare_build_environment_windows.sh b/python/tools/prepare_build_environment_windows.sh index 8b55abf56..a31426ef5 100755 --- a/python/tools/prepare_build_environment_windows.sh +++ b/python/tools/prepare_build_environment_windows.sh @@ -29,8 +29,42 @@ rmdir "$CUDNN_ROOT/include/12.4" cp -r "$CUDNN_ROOT"/* "$CUDA_ROOT" rm cudnn.exe +echo "Installing MSVC 14.29.30133 in Windows Server 2022 Docker container..." + +# Download Visual Studio Build Tools installer +echo "Downloading Visual Studio Build Tools installer..." +curl -L -o vs_buildtools.exe "https://aka.ms/vs/16/release/vs_buildtools.exe" + +# Install Visual Studio Build Tools with MSVC v142 toolset (14.29) +echo "Installing Visual Studio Build Tools with MSVC 14.29..." +./vs_buildtools.exe --quiet --wait --add Microsoft.VisualStudio.Workload.VCTools \ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \ + --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 \ + --add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64 \ + --add Microsoft.VisualStudio.Component.Windows10SDK.19041 \ + --add Microsoft.VisualStudio.Component.VC.CMake.Project \ + --includeRecommended + +# Verify installation +echo "Verifying MSVC installation..." +if [ -f "/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" ]; then + echo "MSVC 14.29.30133 installed successfully!" + + # Display compiler version + "/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" 2>&1 | head -1 +else + echo "Installation verification failed. Checking available versions..." + ls -la "/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/" || echo "MSVC directory not found" + exit 1 +fi + # See https://github.com/oneapi-src/oneapi-ci for installer URLs -curl --netrc-optional -L -nv -o webimage.exe https://registrationcenter-download.intel.com/akdlm/irc_nas/19078/w_BaseKit_p_2023.0.0.25940_offline.exe +curl --netrc-optional -L -nv -o webimage.exe \ + --retry 5 \ + --retry-delay 10 \ + --retry-max-time 300 \ + --continue-at - \ + https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2cbb02eb-dd4c-4058-a4ac-2e38729a8409/intel-oneapi-base-toolkit-2025.1.2.7_offline.exe ./webimage.exe -s -x -f webimage_extracted --log extract.log rm webimage.exe ./webimage_extracted/bootstrapper.exe -s --action install --components="intel.oneapi.win.mkl.devel" --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 --log-dir=. @@ -39,19 +73,35 @@ ONEDNN_VERSION=3.1.1 curl --netrc-optional -L -O https://github.com/oneapi-src/oneDNN/archive/refs/tags/v${ONEDNN_VERSION}.tar.gz tar xf *.tar.gz && rm *.tar.gz cd oneDNN-* -cmake -DCMAKE_BUILD_TYPE=Release -DONEDNN_LIBRARY_TYPE=STATIC -DONEDNN_BUILD_EXAMPLES=OFF -DONEDNN_BUILD_TESTS=OFF -DONEDNN_ENABLE_WORKLOAD=INFERENCE -DONEDNN_ENABLE_PRIMITIVE="CONVOLUTION;REORDER" -DONEDNN_BUILD_GRAPH=OFF . +cmake -G "Visual Studio 16 2019" -DCMAKE_CXX_COMPILER="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" -DCMAKE_C_COMPILER="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" -DCMAKE_BUILD_TYPE=Release -DONEDNN_LIBRARY_TYPE=STATIC -DONEDNN_BUILD_EXAMPLES=OFF -DONEDNN_BUILD_TESTS=OFF -DONEDNN_ENABLE_WORKLOAD=INFERENCE -DONEDNN_ENABLE_PRIMITIVE="CONVOLUTION;REORDER" -DONEDNN_BUILD_GRAPH=OFF . cmake --build . --config Release --target install --parallel 6 cd .. rm -r oneDNN-* mkdir build cd build -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$CTRANSLATE2_ROOT -DCMAKE_PREFIX_PATH="C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/compiler/lib/intel64_win;C:/Program Files (x86)/oneDNN" -DBUILD_CLI=OFF -DWITH_DNNL=ON -DWITH_CUDA=ON -DWITH_CUDNN=ON -DCUDA_TOOLKIT_ROOT_DIR="$CUDA_ROOT" -DCUDA_DYNAMIC_LOADING=ON -DCUDA_NVCC_FLAGS="-Xfatbin=-compress-all" -DCUDA_ARCH_LIST="Common" .. +cmake -G "Visual Studio 16 2019" -DCMAKE_CXX_COMPILER="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" -DCMAKE_C_COMPILER="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$CTRANSLATE2_ROOT -DCMAKE_PREFIX_PATH="C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/compiler/lib/intel64_win;C:/Program Files (x86)/oneDNN" -DBUILD_CLI=OFF -DWITH_DNNL=ON -DWITH_CUDA=ON -DWITH_CUDNN=ON -DCUDA_TOOLKIT_ROOT_DIR="$CUDA_ROOT" -DCUDA_DYNAMIC_LOADING=ON -DCUDA_NVCC_FLAGS="-Xfatbin=-compress-all" -DCUDA_ARCH_LIST="Common" .. cmake --build . --config Release --target install --parallel 6 --verbose cd .. rm -r build cp README.md python/ cp $CTRANSLATE2_ROOT/bin/ctranslate2.dll python/ctranslate2/ -cp "C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler/libiomp5md.dll" python/ctranslate2/ + +# Find the libiomp5md.dll file +LIBIOMP5_PATH=$(find "C:/Program Files (x86)/Intel/oneAPI" -name "libiomp5md.dll" -type f 2>/dev/null | head -1) + +# Check if file was found +if [ -z "$LIBIOMP5_PATH" ]; then + echo "Error: libiomp5md.dll not found in Intel oneAPI installation." + echo "Please ensure Intel oneAPI HPC Toolkit (with compiler) is installed." + echo "" + echo "Alternative locations to check manually:" + echo "- C:/Program Files/Intel/oneAPI/compiler/*/windows/redist/intel64_win/compiler/" + echo "- C:/Program Files (x86)/Intel/oneAPI/compiler/*/windows/redist/intel64_win/compiler/" + exit 1 +fi +echo "Found libiomp5md.dll at: $LIBIOMP5_PATH" + +cp "$LIBIOMP5_PATH" python/ctranslate2/ cp "$CUDA_ROOT/bin/cudnn64_9.dll" python/ctranslate2/ From dff60f78cb701a846c1e02fb96464be8208ee09f Mon Sep 17 00:00:00 2001 From: 3manifold <22544721+3manifold@users.noreply.github.com> Date: Sun, 20 Jul 2025 11:55:55 +0200 Subject: [PATCH 2/6] Edits after rebase --- CMakeLists.txt | 6 ++++-- .../prepare_build_environment_windows.sh | 21 ++++--------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12dfe9188..27c82355a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,9 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(WITH_TENSOR_PARALLEL "Compile with NCCL and MPI backend" OFF) option(WITH_FLASH_ATTN "Compile with Flash Attention 2" OFF) +MESSAGE(STATUS "Compiler Id: ${CMAKE_CXX_COMPILER_ID}") +MESSAGE(STATUS "Compiler Version: ${CMAKE_CXX_COMPILER_VERSION}") + if(ENABLE_PROFILING) message(STATUS "Enable profiling support") add_definitions(-DCT2_ENABLE_PROFILING) @@ -688,8 +691,7 @@ endif() if(BUILD_TESTS) add_subdirectory(tests) endif() -MESSAGE(STATUS "XXXCompiler Id: ${CMAKE_CXX_COMPILER_ID}") -MESSAGE(STATUS "XXXCompiler Version: ${CMAKE_CXX_COMPILER_VERSION}") + include(GNUInstallDirs) if (BUILD_CLI) diff --git a/python/tools/prepare_build_environment_windows.sh b/python/tools/prepare_build_environment_windows.sh index a31426ef5..58afd9662 100755 --- a/python/tools/prepare_build_environment_windows.sh +++ b/python/tools/prepare_build_environment_windows.sh @@ -29,14 +29,8 @@ rmdir "$CUDNN_ROOT/include/12.4" cp -r "$CUDNN_ROOT"/* "$CUDA_ROOT" rm cudnn.exe -echo "Installing MSVC 14.29.30133 in Windows Server 2022 Docker container..." - -# Download Visual Studio Build Tools installer -echo "Downloading Visual Studio Build Tools installer..." -curl -L -o vs_buildtools.exe "https://aka.ms/vs/16/release/vs_buildtools.exe" - -# Install Visual Studio Build Tools with MSVC v142 toolset (14.29) -echo "Installing Visual Studio Build Tools with MSVC 14.29..." +# Install MSVC 14.29.30133 +curl -L -o vs_buildtools.exe "https://aka.ms/vs/16/release/vs_buildtools.exe" ./vs_buildtools.exe --quiet --wait --add Microsoft.VisualStudio.Workload.VCTools \ --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \ --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 \ @@ -45,11 +39,9 @@ echo "Installing Visual Studio Build Tools with MSVC 14.29..." --add Microsoft.VisualStudio.Component.VC.CMake.Project \ --includeRecommended -# Verify installation -echo "Verifying MSVC installation..." +# Verify installation if [ -f "/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" ]; then echo "MSVC 14.29.30133 installed successfully!" - # Display compiler version "/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" 2>&1 | head -1 else @@ -59,12 +51,7 @@ else fi # See https://github.com/oneapi-src/oneapi-ci for installer URLs -curl --netrc-optional -L -nv -o webimage.exe \ - --retry 5 \ - --retry-delay 10 \ - --retry-max-time 300 \ - --continue-at - \ - https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2cbb02eb-dd4c-4058-a4ac-2e38729a8409/intel-oneapi-base-toolkit-2025.1.2.7_offline.exe +curl --netrc-optional -L -nv -o webimage.exe https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2cbb02eb-dd4c-4058-a4ac-2e38729a8409/intel-oneapi-base-toolkit-2025.1.2.7_offline.exe ./webimage.exe -s -x -f webimage_extracted --log extract.log rm webimage.exe ./webimage_extracted/bootstrapper.exe -s --action install --components="intel.oneapi.win.mkl.devel" --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 --log-dir=. From 23fed5fbf13b4cb3bedf44c1e1644bdedcb744ba Mon Sep 17 00:00:00 2001 From: 3manifold <22544721+3manifold@users.noreply.github.com> Date: Sun, 20 Jul 2025 12:33:25 +0200 Subject: [PATCH 3/6] Make script less verbose --- .../prepare_build_environment_windows.sh | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/python/tools/prepare_build_environment_windows.sh b/python/tools/prepare_build_environment_windows.sh index 58afd9662..57a093938 100755 --- a/python/tools/prepare_build_environment_windows.sh +++ b/python/tools/prepare_build_environment_windows.sh @@ -41,12 +41,9 @@ curl -L -o vs_buildtools.exe "https://aka.ms/vs/16/release/vs_buildtools.exe" # Verify installation if [ -f "/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" ]; then - echo "MSVC 14.29.30133 installed successfully!" - # Display compiler version - "/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" 2>&1 | head -1 + echo "MSVC 14.29.30133 installed successfully!" else - echo "Installation verification failed. Checking available versions..." - ls -la "/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/" || echo "MSVC directory not found" + echo "Installation verification failed. Checking available versions..." exit 1 fi @@ -74,18 +71,10 @@ rm -r build cp README.md python/ cp $CTRANSLATE2_ROOT/bin/ctranslate2.dll python/ctranslate2/ - -# Find the libiomp5md.dll file + LIBIOMP5_PATH=$(find "C:/Program Files (x86)/Intel/oneAPI" -name "libiomp5md.dll" -type f 2>/dev/null | head -1) - -# Check if file was found if [ -z "$LIBIOMP5_PATH" ]; then - echo "Error: libiomp5md.dll not found in Intel oneAPI installation." - echo "Please ensure Intel oneAPI HPC Toolkit (with compiler) is installed." - echo "" - echo "Alternative locations to check manually:" - echo "- C:/Program Files/Intel/oneAPI/compiler/*/windows/redist/intel64_win/compiler/" - echo "- C:/Program Files (x86)/Intel/oneAPI/compiler/*/windows/redist/intel64_win/compiler/" + echo "Error: libiomp5md.dll not found in Intel oneAPI installation." exit 1 fi echo "Found libiomp5md.dll at: $LIBIOMP5_PATH" From b42d3ca4343e80a7f53373f583af7ef59cab0673 Mon Sep 17 00:00:00 2001 From: 3manifold <22544721+3manifold@users.noreply.github.com> Date: Mon, 21 Jul 2025 09:40:27 +0200 Subject: [PATCH 4/6] Update submodules to latest commits --- third_party/cpu_features | 2 +- third_party/cutlass | 2 +- third_party/cxxopts | 2 +- third_party/googletest | 2 +- third_party/ruy | 2 +- third_party/spdlog | 2 +- third_party/thrust | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/third_party/cpu_features b/third_party/cpu_features index 8a494eb1e..d3b2440fc 160000 --- a/third_party/cpu_features +++ b/third_party/cpu_features @@ -1 +1 @@ -Subproject commit 8a494eb1e158ec2050e5f699a504fbc9b896a43b +Subproject commit d3b2440fcfc25fe8e6d0d4a85f06d68e98312f5b diff --git a/third_party/cutlass b/third_party/cutlass index bbe579a9e..9baa06dd5 160000 --- a/third_party/cutlass +++ b/third_party/cutlass @@ -1 +1 @@ -Subproject commit bbe579a9e3beb6ea6626d9227ec32d0dae119a49 +Subproject commit 9baa06dd57804ce8fb5efe9e471b3451341522c6 diff --git a/third_party/cxxopts b/third_party/cxxopts index c74846a89..5e6d1e29f 160000 --- a/third_party/cxxopts +++ b/third_party/cxxopts @@ -1 +1 @@ -Subproject commit c74846a891b3cc3bfa992d588b1295f528d43039 +Subproject commit 5e6d1e29f7546d9d94fe3d193b788b280bf1f37d diff --git a/third_party/googletest b/third_party/googletest index f8d7d77c0..7e17b15f1 160000 --- a/third_party/googletest +++ b/third_party/googletest @@ -1 +1 @@ -Subproject commit f8d7d77c06936315286eb55f8de22cd23c188571 +Subproject commit 7e17b15f1547bb8dd9c2fed91043b7af3437387f diff --git a/third_party/ruy b/third_party/ruy index 363f25228..9940fbf1e 160000 --- a/third_party/ruy +++ b/third_party/ruy @@ -1 +1 @@ -Subproject commit 363f252289fb7a1fba1703d99196524698cb884d +Subproject commit 9940fbf1e0c0863907e77e0600b99bb3e2bc2b9f diff --git a/third_party/spdlog b/third_party/spdlog index 76fb40d95..9ecdf5c8a 160000 --- a/third_party/spdlog +++ b/third_party/spdlog @@ -1 +1 @@ -Subproject commit 76fb40d95455f249bd70824ecfcae7a8f0930fa3 +Subproject commit 9ecdf5c8a1a3ace5673f9fd1857da1b6375b5114 diff --git a/third_party/thrust b/third_party/thrust index d997cd37a..756c5afc0 160000 --- a/third_party/thrust +++ b/third_party/thrust @@ -1 +1 @@ -Subproject commit d997cd37a95b0fa2f1a0cd4697fd1188a842fbc8 +Subproject commit 756c5afc0750f1413da05bd2b6505180e84c53d4 From 4f81649737103f272699ffd0f75b6b5cdf05ed4f Mon Sep 17 00:00:00 2001 From: 3manifold <22544721+3manifold@users.noreply.github.com> Date: Mon, 21 Jul 2025 09:43:24 +0200 Subject: [PATCH 5/6] Update CMake min --- CMakeLists.txt | 8 +------- docs/quickstart.md | 2 +- examples/wngt2020/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27c82355a..083b307bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,4 @@ -cmake_minimum_required(VERSION 3.7) - -# Set policy for setting the MSVC runtime library for static MSVC builds -if(POLICY CMP0091) - cmake_policy(SET CMP0091 NEW) -endif() - +cmake_minimum_required(VERSION 3.10) project(ctranslate2) option(WITH_MKL "Compile with Intel MKL backend" ON) diff --git a/docs/quickstart.md b/docs/quickstart.md index 4b10a04c6..8720c0b9d 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -79,7 +79,7 @@ See the [installation guide](installation.md) for more information. **2\. Add CTranslate2 to your CMakeLists.txt** ```cmake -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.10) project (CTRANSLATE2_DEMO) find_package(ctranslate2) diff --git a/examples/wngt2020/CMakeLists.txt b/examples/wngt2020/CMakeLists.txt index d0a527dc2..da1e57d12 100644 --- a/examples/wngt2020/CMakeLists.txt +++ b/examples/wngt2020/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.10) project(wngt2020) set(CMAKE_CXX_STANDARD 11) set(CMAKE_BUILD_TYPE Release) From 92d6b71d12a268ad1aa624fc0970f8f053c1e9dc Mon Sep 17 00:00:00 2001 From: 3manifold <22544721+3manifold@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:22:02 +0200 Subject: [PATCH 6/6] Revoke policy changes for setting the MSVC runtime library for static MSVC builds --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 083b307bf..9d75878e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,10 @@ cmake_minimum_required(VERSION 3.10) + +# Set policy for setting the MSVC runtime library for static MSVC builds +if(POLICY CMP0091) + cmake_policy(SET CMP0091 NEW) +endif() + project(ctranslate2) option(WITH_MKL "Compile with Intel MKL backend" ON)