Skip to content

Commit

Permalink
Remove old CMake workaround causing failure on Windows (Apress#41) (A…
Browse files Browse the repository at this point in the history
…press#42)

The CMake for the samples use a work-around for linking the SYCL
libraries, however this causes failures on Windows due to explicit
linking rather than letting the DPC++ driver handle it correctly when
passed the -fsycl flag. This commit removes the workaround as it is
believed to no longer be needed.

Signed-off-by: Larsen, Steffen <[email protected]>

Signed-off-by: Larsen, Steffen <[email protected]>
  • Loading branch information
steffenlarsen authored Oct 25, 2022
1 parent 5eac3fd commit 7c9c721
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ function(add_book_sample)
add_executable(${BOOK_SAMPLE_TARGET} ${BOOK_SAMPLE_SOURCES})

target_compile_options(${BOOK_SAMPLE_TARGET} PRIVATE -fsycl -fsycl-unnamed-lambda -ferror-limit=1 -Wall -Wpedantic ${BOOK_SAMPLE_ADDITIONAL_COMPILE_OPTIONS})
# Passing -fsycl via target_link_libraries for older versions of CMake:
#target_link_options(${BOOK_SAMPLE_TARGET} PRIVATE -fsycl )
target_link_libraries(${BOOK_SAMPLE_TARGET} PRIVATE sycl -fsycl )

target_link_libraries(${BOOK_SAMPLE_TARGET} PRIVATE ${BOOK_SAMPLE_LIBS})

Expand Down

0 comments on commit 7c9c721

Please sign in to comment.