Remove ugly CMake endif text in parenthesis

This commit is contained in:
Tom Deakin 2016-05-11 13:37:12 +01:00
parent bf29b02d35
commit e095cb67f8

View File

@ -27,15 +27,15 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
if ("${XCODE_VERSION}" MATCHES "Xcode 7.3.1")
message("Xcode version not supported by CUDA")
set(FLAG False)
endif ("${XCODE_VERSION}" MATCHES "Xcode 7.3.1")
endif ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
endif ()
endif ()
if (${FLAG} AND ${CUDA_FOUND})
list(APPEND CUDA_NVCC_FLAGS --std=c++11)
cuda_add_executable(gpu-stream-cuda main.cpp CUDAStream.cu)
target_compile_definitions(gpu-stream-cuda PUBLIC CUDA)
else (${FLAG} AND ${CUDA_FOUND})
else ()
message("Skipping CUDA...")
endif (${FLAG} AND ${CUDA_FOUND})
endif ()
#-------------------------------------------------------------------------------
# OpenCL
@ -45,9 +45,9 @@ if (${OpenCL_FOUND})
add_executable(gpu-stream-ocl main.cpp OCLStream.cpp)
target_compile_definitions(gpu-stream-ocl PUBLIC OCL)
target_link_libraries(gpu-stream-ocl ${OpenCL_LIBRARY})
else (${OpenCL_FOUND})
else ()
message("Skipping OpenCL...")
endif (${OpenCL_FOUND})
endif ()
#-------------------------------------------------------------------------------
# OpenACC
@ -61,6 +61,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "PGI")
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Cray")
CHECK_CXX_COMPILER_FLAG(-hacc=openacc OPENACC)
endif ()
if (OPENACC)
add_executable(gpu-stream-acc main.cpp ACCStream.cpp)
target_compile_definitions(gpu-stream-acc PUBLIC ACC)