Skip to content

[SYCL][NFC] SYCL RT CMakeLists cleanup [7/N] #17631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: sycl
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions sycl/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME)
endif()
endif()

# TODO: Enabled for MSVC
if (NOT MSVC AND SYCL_LIB_WITH_DEBUG_SYMBOLS)
if (SYCL_LIB_WITH_DEBUG_SYMBOLS AND NOT MSVC) # TODO: Enable for MSVC
separate_arguments(CMAKE_CXX_FLAGS_DEBUG_SEPARATED UNIX_COMMAND "${CMAKE_CXX_FLAGS_DEBUG}")
target_compile_options(${LIB_NAME} PRIVATE ${CMAKE_CXX_FLAGS_DEBUG_SEPARATED})
endif()
Expand Down Expand Up @@ -159,17 +158,15 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME)
target_link_options(${LIB_NAME} PRIVATE "LINKER:/DEPENDENTLOADFLAG:0x2000" "LINKER:/MANIFEST:NO" "LINKER:/MANIFEST:EMBED" "LINKER:/MANIFESTINPUT:${CMAKE_CURRENT_SOURCE_DIR}/${MANIFEST_FILE_NAME}")
endif()

if (WIN32)
if (ARG_IMPLIB_NAME)
add_custom_command(
TARGET ${LIB_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${LIB_NAME}.lib ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ARG_IMPLIB_NAME}.lib
COMMENT "Creating version-agnostic copy of the import library.")
install(
FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ARG_IMPLIB_NAME}.lib
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT sycl)
endif()
if (ARG_IMPLIB_NAME AND WIN32)
add_custom_command(
TARGET ${LIB_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${LIB_NAME}.lib ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ARG_IMPLIB_NAME}.lib
COMMENT "Creating version-agnostic copy of the import library.")
install(
FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ARG_IMPLIB_NAME}.lib
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT sycl)
endif()

if (MSVC)
Expand Down
Loading