Differential D55772 Diff 210553 openmp/trunk/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
Changeset View
Changeset View
Standalone View
Standalone View
openmp/trunk/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | if (${discard_cached} OR NOT DEFINED ${output}) | ||||
else() | else() | ||||
message(STATUS "Performing Test ${output} - Failed") | message(STATUS "Performing Test ${output} - Failed") | ||||
endif() | endif() | ||||
endif() | endif() | ||||
endfunction() | endfunction() | ||||
# These flags are required to emit LLVM Bitcode. We check them together because | # These flags are required to emit LLVM Bitcode. We check them together because | ||||
# if any of them are not supported, there is no point in finding out which are. | # if any of them are not supported, there is no point in finding out which are. | ||||
set(compiler_flags_required -emit-llvm -O1 --cuda-device-only --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}) | set(compiler_flags_required -emit-llvm -O1 --cuda-device-only -std=c++11 --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}) | ||||
set(compiler_flags_required_src "extern \"C\" __device__ int thread() { return threadIdx.x; }") | set(compiler_flags_required_src "extern \"C\" __device__ int thread() { return threadIdx.x; }") | ||||
check_bitcode_compilation(LIBOMPTARGET_NVPTX_CUDA_COMPILER_SUPPORTS_FLAGS_REQUIRED "${compiler_flags_required_src}" ${compiler_flags_required}) | check_bitcode_compilation(LIBOMPTARGET_NVPTX_CUDA_COMPILER_SUPPORTS_FLAGS_REQUIRED "${compiler_flags_required_src}" ${compiler_flags_required}) | ||||
# It makes no sense to continue given that the compiler doesn't support | # It makes no sense to continue given that the compiler doesn't support | ||||
# emitting basic LLVM Bitcode | # emitting basic LLVM Bitcode | ||||
if (NOT LIBOMPTARGET_NVPTX_CUDA_COMPILER_SUPPORTS_FLAGS_REQUIRED) | if (NOT LIBOMPTARGET_NVPTX_CUDA_COMPILER_SUPPORTS_FLAGS_REQUIRED) | ||||
return() | return() | ||||
endif() | endif() | ||||
Show All 22 Lines |