Skip to content

Commit

Permalink
add user-friendly compiler checks to the CMakelists.txt (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
haichangsi authored Nov 13, 2023
1 parent 633ad92 commit 717acdd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)

project(
distributed_ranges_tutorial
LANGUAGES CXX
VERSION 0.1
DESCRIPTION "Distributed ranges tutorial")

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fsycl COMPILER_SUPPORTS_FSYCL)

if(NOT COMPILER_SUPPORTS_FSYCL)
message(
FATAL_ERROR
"A compiler with SYCL support is required. Configure Intel(R) oneAPI DPC++/C++ or any other compiler with SYCL support in your system."
)
endif()

find_package(MPI REQUIRED)

add_subdirectory(src)
Expand Down

0 comments on commit 717acdd

Please sign in to comment.