Skip to content
Snippets Groups Projects
Commit 96de53d3 authored by Simone Bna's avatar Simone Bna
Browse files

BUG #4: workaround for having CUDA 10 compiler working with gcc8

parent f8a8c546
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,15 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) ...@@ -12,6 +12,15 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
"In-source builds disallowed. Use a separate build directory") "In-source builds disallowed. Use a separate build directory")
endif() endif()
# workaround to fix a problem with GCC and CUDA 10, fixed in CUDA 11
# see https://github.com/LLNL/blt/issues/341
# an alternative is to add: -Xcompiler=-mno-float128
if ( (CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_SYSTEM_PROCESSOR MATCHES ppc64le) )
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -std=c++11")
endif()
endif()
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Simple discovery and sanity checks # Simple discovery and sanity checks
......
...@@ -12,6 +12,15 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) ...@@ -12,6 +12,15 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
"In-source builds disallowed. Use a separate build directory") "In-source builds disallowed. Use a separate build directory")
endif() endif()
# workaround to fix a problem with GCC and CUDA 10, fixed in CUDA 11
# see https://github.com/LLNL/blt/issues/341
# an alternative is to add: -Xcompiler=-mno-float128
if ( (CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_SYSTEM_PROCESSOR MATCHES ppc64le) )
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -std=c++11")
endif()
endif()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Simple discovery and sanity checks # Simple discovery and sanity checks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment