From b4e67d12216e3b9de468132941c7bdf67db174e6 Mon Sep 17 00:00:00 2001 From: "Huang, Hong-Chang" Date: Tue, 4 Aug 2026 22:37:30 +0800 Subject: [PATCH] fix(cmake): only apply /MP to the MSVC compiler, not icx (#1846) --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a003f400..3c2b7b4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,10 +11,11 @@ endif() if (MSVC) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) add_compile_definitions(_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING) + # /MP is MSVC-only: icx rejects it outright once offloading is enabled. add_compile_options( - $<$:/MP> + $<$,$>:/MP> $<$:/utf-8> - $<$:/MP> + $<$,$>:/MP> $<$:/utf-8> ) endif()