Remove ugly CMake endif text in parenthesis
This commit is contained in:
parent
bf29b02d35
commit
e095cb67f8
@ -27,15 +27,15 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
|||||||
if ("${XCODE_VERSION}" MATCHES "Xcode 7.3.1")
|
if ("${XCODE_VERSION}" MATCHES "Xcode 7.3.1")
|
||||||
message("Xcode version not supported by CUDA")
|
message("Xcode version not supported by CUDA")
|
||||||
set(FLAG False)
|
set(FLAG False)
|
||||||
endif ("${XCODE_VERSION}" MATCHES "Xcode 7.3.1")
|
endif ()
|
||||||
endif ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
endif ()
|
||||||
if (${FLAG} AND ${CUDA_FOUND})
|
if (${FLAG} AND ${CUDA_FOUND})
|
||||||
list(APPEND CUDA_NVCC_FLAGS --std=c++11)
|
list(APPEND CUDA_NVCC_FLAGS --std=c++11)
|
||||||
cuda_add_executable(gpu-stream-cuda main.cpp CUDAStream.cu)
|
cuda_add_executable(gpu-stream-cuda main.cpp CUDAStream.cu)
|
||||||
target_compile_definitions(gpu-stream-cuda PUBLIC CUDA)
|
target_compile_definitions(gpu-stream-cuda PUBLIC CUDA)
|
||||||
else (${FLAG} AND ${CUDA_FOUND})
|
else ()
|
||||||
message("Skipping CUDA...")
|
message("Skipping CUDA...")
|
||||||
endif (${FLAG} AND ${CUDA_FOUND})
|
endif ()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# OpenCL
|
# OpenCL
|
||||||
@ -45,9 +45,9 @@ if (${OpenCL_FOUND})
|
|||||||
add_executable(gpu-stream-ocl main.cpp OCLStream.cpp)
|
add_executable(gpu-stream-ocl main.cpp OCLStream.cpp)
|
||||||
target_compile_definitions(gpu-stream-ocl PUBLIC OCL)
|
target_compile_definitions(gpu-stream-ocl PUBLIC OCL)
|
||||||
target_link_libraries(gpu-stream-ocl ${OpenCL_LIBRARY})
|
target_link_libraries(gpu-stream-ocl ${OpenCL_LIBRARY})
|
||||||
else (${OpenCL_FOUND})
|
else ()
|
||||||
message("Skipping OpenCL...")
|
message("Skipping OpenCL...")
|
||||||
endif (${OpenCL_FOUND})
|
endif ()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# OpenACC
|
# OpenACC
|
||||||
@ -61,6 +61,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "PGI")
|
|||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Cray")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Cray")
|
||||||
CHECK_CXX_COMPILER_FLAG(-hacc=openacc OPENACC)
|
CHECK_CXX_COMPILER_FLAG(-hacc=openacc OPENACC)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (OPENACC)
|
if (OPENACC)
|
||||||
add_executable(gpu-stream-acc main.cpp ACCStream.cpp)
|
add_executable(gpu-stream-acc main.cpp ACCStream.cpp)
|
||||||
target_compile_definitions(gpu-stream-acc PUBLIC ACC)
|
target_compile_definitions(gpu-stream-acc PUBLIC ACC)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user