Skip to content

GCC+nvcc build failure with -mno-float128 #9

@mlohry

Description

@mlohry

The template project fails to build on a basic ubuntu 20.04 system with nvcc 11.3 and gcc 9.3.0:

cmake ../ -DENABLE_CUDA=On -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc

and make results in:

c++: error: unrecognized command line option ‘-mno-float128’

It seems that -mno-float128 flag is clang only?

The offending CMake entry is in RAJA/CMakeLists.txt:90:

  if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
            if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
              set (CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -mno-float128")
            endif ()
endif()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions