aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/EigenTesting.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/EigenTesting.cmake')
-rw-r--r--cmake/EigenTesting.cmake41
1 files changed, 26 insertions, 15 deletions
diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake
index 1fcdcc7bb..8a995f118 100644
--- a/cmake/EigenTesting.cmake
+++ b/cmake/EigenTesting.cmake
@@ -111,7 +111,6 @@ endmacro(ei_add_test_internal)
# SYCL
macro(ei_add_test_internal_sycl testname testname_with_suffix)
- include_directories( SYSTEM ${COMPUTECPP_PACKAGE_ROOT_DIR}/include)
set(targetname ${testname_with_suffix})
if(EIGEN_ADD_TEST_FILENAME_EXTENSION)
@@ -124,18 +123,26 @@ macro(ei_add_test_internal_sycl testname testname_with_suffix)
set( bc_file "${CMAKE_CURRENT_BINARY_DIR}/${filename}.sycl")
set( host_file "${CMAKE_CURRENT_SOURCE_DIR}/${filename}")
- ADD_CUSTOM_COMMAND(
- OUTPUT ${include_file}
- COMMAND ${CMAKE_COMMAND} -E echo "\\#include \\\"${host_file}\\\"" > ${include_file}
- COMMAND ${CMAKE_COMMAND} -E echo "\\#include \\\"${bc_file}\\\"" >> ${include_file}
- DEPENDS ${host_file} ${bc_file}
- COMMENT "Building ComputeCpp integration header file ${include_file}"
- )
- # Add a custom target for the generated integration header
- add_custom_target("${testname}_integration_header_sycl" DEPENDS ${include_file})
-
- add_executable(${targetname} ${include_file})
- add_dependencies(${targetname} "${testname}_integration_header_sycl")
+ if(NOT EIGEN_SYCL_TRISYCL)
+ include_directories( SYSTEM ${COMPUTECPP_PACKAGE_ROOT_DIR}/include)
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${include_file}
+ COMMAND ${CMAKE_COMMAND} -E echo "\\#include \\\"${host_file}\\\"" > ${include_file}
+ COMMAND ${CMAKE_COMMAND} -E echo "\\#include \\\"${bc_file}\\\"" >> ${include_file}
+ DEPENDS ${filename} ${bc_file}
+ COMMENT "Building ComputeCpp integration header file ${include_file}"
+ )
+
+ # Add a custom target for the generated integration header
+ add_custom_target("${testname}_integration_header_sycl" DEPENDS ${include_file})
+
+ add_executable(${targetname} ${include_file})
+ add_dependencies(${targetname} "${testname}_integration_header_sycl")
+ else()
+ add_executable(${targetname} ${host_file})
+ endif()
+
add_sycl_to_target(${targetname} ${CMAKE_CURRENT_BINARY_DIR} ${filename})
if (targetname MATCHES "^eigen2_")
@@ -467,7 +474,11 @@ macro(ei_testing_print_summary)
endif()
if(EIGEN_TEST_SYCL)
- message(STATUS "SYCL: ON")
+ if(EIGEN_SYCL_TRISYCL)
+ message(STATUS "SYCL: ON (using triSYCL)")
+ else()
+ message(STATUS "SYCL: ON (using computeCPP)")
+ endif()
else()
message(STATUS "SYCL: OFF")
endif()
@@ -720,4 +731,4 @@ macro(ei_test_get_compilerver_from_cxx_version_string)
ei_test1_get_compilerver_from_cxx_version_string("i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)" "llvm-g++" "4.2.1")
ei_test1_get_compilerver_from_cxx_version_string("g++-mp-4.4 (GCC) 4.4.6" "g++" "4.4.6")
ei_test1_get_compilerver_from_cxx_version_string("g++-mp-4.4 (GCC) 2011" "g++" "4.4")
-endmacro(ei_test_get_compilerver_from_cxx_version_string) \ No newline at end of file
+endmacro(ei_test_get_compilerver_from_cxx_version_string)