[llvm] [libsycl][NFC] Move the cmake msvc DLL check (PR #193485)
Sergey Semenov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 09:47:23 PDT 2026
https://github.com/sergey-semenov updated https://github.com/llvm/llvm-project/pull/193485
>From 5f0af705d90bfc30d28c278472ab1c96c934027b Mon Sep 17 00:00:00 2001
From: Sergey Semenov <sergey.semenov at intel.com>
Date: Wed, 22 Apr 2026 05:02:51 -0700
Subject: [PATCH] [libsycl][NFC] Move the cmake msvc DLL check
Addresses a review comment from
https://github.com/llvm/llvm-project/pull/188770
---
libsycl/CMakeLists.txt | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/libsycl/CMakeLists.txt b/libsycl/CMakeLists.txt
index ae3fd4359c3f2..4636f6743b33e 100644
--- a/libsycl/CMakeLists.txt
+++ b/libsycl/CMakeLists.txt
@@ -16,12 +16,17 @@ set(CMAKE_CXX_EXTENSIONS OFF)
# Limitations
#===============================================================================
-if (CMAKE_SYSTEM_NAME STREQUAL Windows AND NOT MSVC)
+if (CMAKE_SYSTEM_NAME STREQUAL Windows)
# Build with other compilers is not configured, not guaranteed and not tested.
+ if (NOT MSVC)
message(FATAL_ERROR
"When compiling for Windows, libsycl requires a"
" version of Microsoft Visual C++ or another compiler"
" that uses the Visual C++ cl command-line syntax.")
+ endif()
+ if (CMAKE_MSVC_RUNTIME_LIBRARY AND (NOT CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "DLL$"))
+ message(FATAL_ERROR "libsycl requires a DLL version of the MSVC CRT.")
+ endif()
endif()
#===============================================================================
@@ -119,9 +124,6 @@ install(DIRECTORY "${LIBSYCL_SOURCE_INCLUDE_DIR}/CL" DESTINATION ${LIBSYCL_INCLU
set(LIBSYCL_LIB_NAME "LLVMSYCL")
set(LIBSYCL_SHARED_OUTPUT_NAME "${LIBSYCL_LIB_NAME}")
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
- if (CMAKE_MSVC_RUNTIME_LIBRARY AND (NOT CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "DLL$"))
- message(FATAL_ERROR "libsycl requires a DLL version of the MSVC CRT.")
- endif()
if ((NOT CMAKE_MSVC_RUNTIME_LIBRARY AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
OR (CMAKE_MSVC_RUNTIME_LIBRARY STREQUAL "MultiThreadedDebugDLL"))
set(LIBSYCL_SHARED_OUTPUT_NAME "${LIBSYCL_SHARED_OUTPUT_NAME}d")
More information about the llvm-commits
mailing list