aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/FindComputeCpp.cmake
diff options
context:
space:
mode:
authorGravatar a-doumoulakis <anonymous@invalid.net>2017-05-24 17:45:29 +0100
committerGravatar a-doumoulakis <anonymous@invalid.net>2017-05-24 17:45:29 +0100
commit7a8ba565f83e17ed04f4b00ede03a9f2be27c9ee (patch)
treed795d30ccded92602221242ccba83c760e7a9c97 /cmake/FindComputeCpp.cmake
parenta5226ce4f77f68a7f8590174ed3cdebb89cbe127 (diff)
parent615733381ec4b5a073d0a4c72e3cc749d3c5d579 (diff)
Merge changed from upstream
Diffstat (limited to 'cmake/FindComputeCpp.cmake')
-rw-r--r--cmake/FindComputeCpp.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/FindComputeCpp.cmake b/cmake/FindComputeCpp.cmake
index 27e5c9b1f..90222ed0e 100644
--- a/cmake/FindComputeCpp.cmake
+++ b/cmake/FindComputeCpp.cmake
@@ -201,7 +201,8 @@ function(__build_spir targetName sourceFile binaryDir)
${device_compiler_includes}
-o ${outputSyclFile}
-c ${CMAKE_CURRENT_SOURCE_DIR}/${sourceFile}
- DEPENDS ${sourceFile}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${sourceFile}
+ IMPLICIT_DEPENDS CXX "${CMAKE_CURRENT_SOURCE_DIR}/${sourceFile}"
WORKING_DIRECTORY ${binaryDir}
COMMENT "Building ComputeCpp integration header file ${outputSyclFile}")
@@ -233,8 +234,9 @@ endfunction()
# sourceFile : Source file to be compiled for SYCL.
# binaryDir : Intermediate directory to output the integration header.
#
-function(add_sycl_to_target targetName sourceFile binaryDir)
+function(add_sycl_to_target targetName binaryDir sourceFile)
+ set(sourceFiles ${sourceFiles} ${ARGN})
# Add custom target to run compute++ and generate the integration header
__build_spir(${targetName} ${sourceFile} ${binaryDir})
@@ -242,4 +244,4 @@ function(add_sycl_to_target targetName sourceFile binaryDir)
target_link_libraries(${targetName} PUBLIC ${COMPUTECPP_RUNTIME_LIBRARY}
PUBLIC ${OpenCL_LIBRARIES})
-endfunction(add_sycl_to_target)
+endfunction(add_sycl_to_target) \ No newline at end of file