Skip to content

Commit e502190

Browse files
fix comments
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 81c9efd commit e502190

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

libsycl/CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ set(CMAKE_CXX_EXTENSIONS OFF)
1818

1919
if (CMAKE_SYSTEM_NAME STREQUAL Windows AND NOT MSVC)
2020
# Build with other compilers is not configured, not guaranteed and not tested.
21-
message( FATAL_ERROR
22-
"On Windows libsycl supports compiler which is some version of Microsoft"
23-
" Visual C++ or another compiler simulating the Visual C++ cl"
24-
" command-line syntax" )
21+
message(FATAL_ERROR
22+
"When compiling for Windows, libsycl requires a"
23+
" version of Microsoft Visual C++ or another compiler"
24+
" that uses the Visual C++ cl command-line syntax.")
2525
endif()
2626

2727
#===============================================================================
@@ -71,8 +71,11 @@ set(LIBSYCL_MAJOR_VERSION 0)
7171
set(LIBSYCL_MINOR_VERSION 1)
7272
set(LIBSYCL_PATCH_VERSION 0)
7373
set(LIBSYCL_VERSION_STRING "${LIBSYCL_MAJOR_VERSION}.${LIBSYCL_MINOR_VERSION}.${LIBSYCL_PATCH_VERSION}")
74-
set(LIBSYCL_ABI_NAMESPACE "V${LIBSYCL_MAJOR_VERSION}" CACHE STRING
75-
"The inline ABI namespace used by libsycl. It defaults to Vn where `n` is the current ABI version.")
74+
set(LIBSYCL_ABI_NAMESPACE "__V${LIBSYCL_MAJOR_VERSION}" CACHE STRING
75+
"The inline ABI namespace used by libsycl. It defaults to __Vn where `n` is the current ABI version.")
76+
if (NOT LIBSYCL_ABI_NAMESPACE MATCHES "__V.*")
77+
message(FATAL_ERROR "LIBSYCL_ABI_NAMESPACE must be a reserved identifier, got '${LIBSYCL_ABI_NAMESPACE}'.")
78+
endif()
7679

7780
#===============================================================================
7881
# Setup build & install rules

libsycl/src/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ set(LIBSYCL_SOURCES
8080
set(LIB_NAME "sycl")
8181
set(LIB_OUTPUT_NAME "${LIB_NAME}")
8282
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
83-
if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_MSVC_RUNTIME_LIBRARY STREQUAL MultiThreadedDebugDLL)
83+
if (CMAKE_MSVC_RUNTIME_LIBRARY AND (NOT CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "DLL$"))
84+
message(FATAL_ERROR "libsycl requires a DLL version of the MSVC CRT.")
85+
endif()
86+
if ((NOT CMAKE_MSVC_RUNTIME_LIBRARY AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
87+
OR (CMAKE_MSVC_RUNTIME_LIBRARY STREQUAL "MultiThreadedDebugDLL"))
8488
set(LIB_OUTPUT_NAME "${LIB_OUTPUT_NAME}d")
8589
endif()
8690
endif()

0 commit comments

Comments
 (0)