From 319a389f42b776fae5701afcb943fc03be5b5c25 Mon Sep 17 00:00:00 2001 From: Haicheng Wu <57973641+hwu36@users.noreply.github.com> Date: Wed, 27 Apr 2022 10:02:26 -0400 Subject: [PATCH] Update CMakeLists.txt (#473) * Update CMakeLists.txt Add 128bit int support if using nvc++ to solve #310 @jeffhammond, would you please give it a try? * Update CMakeLists.txt correct copy paste error --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b7284b9..cfed600b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -334,6 +334,11 @@ if(CUDA_COMPILER MATCHES "[Cc]lang") link_libraries(nvidia::cudart) endif() +# Support for 128-bit integers if using NVIDIA C++ compiler +if (${CMAKE_CXX_COMPILER_ID} MATCHES "PGI" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "NVHPC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Mint128 ") +endif() + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18) # CMake 3.18 added support for CUDA_ARCHITECTURES target property. We will use this # property for CMake 3.18+, so we request the NEW behavior for correct compatibility.