From 71ad4647ed497f4167f4aa1d9cbdc9bf9011ef51 Mon Sep 17 00:00:00 2001 From: DiamonDinoia Date: Wed, 28 Aug 2024 12:47:36 -0400 Subject: [PATCH] added extended lambda flag to tests --- perftest/cuda/CMakeLists.txt | 2 ++ src/cuda/CMakeLists.txt | 7 +++++-- test/cuda/CMakeLists.txt | 6 ++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/perftest/cuda/CMakeLists.txt b/perftest/cuda/CMakeLists.txt index 8b1ad1c9b..92c870cc5 100644 --- a/perftest/cuda/CMakeLists.txt +++ b/perftest/cuda/CMakeLists.txt @@ -2,6 +2,8 @@ add_executable(cuperftest cuperftest.cu) target_include_directories(cuperftest PUBLIC ${CUFINUFFT_INCLUDE_DIRS}) target_link_libraries(cuperftest PUBLIC cufinufft) target_compile_features(cuperftest PRIVATE cxx_std_17) +target_compile_options(cuperftest + PRIVATE $<$:--extended-lambda>) set_target_properties( cuperftest PROPERTIES LINKER_LANGUAGE CUDA diff --git a/src/cuda/CMakeLists.txt b/src/cuda/CMakeLists.txt index dfe5c9b20..0dfed1886 100644 --- a/src/cuda/CMakeLists.txt +++ b/src/cuda/CMakeLists.txt @@ -37,7 +37,10 @@ set(FINUFFT_CUDA_FLAGS -fmad=true -restrict --extra-device-vectorization - # $<$:-G -maxrregcount 64 > + $<$:-G + -maxrregcount + 64 + > >) add_library(cufinufft_common_objects OBJECT ${PRECISION_INDEPENDENT_SRC}) @@ -81,7 +84,7 @@ set_target_properties( CUDA_STANDARD_REQUIRED ON ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") target_compile_features(cufinufft PRIVATE cxx_std_17) -target_compile_options(cufinufft PUBLIC ${FINUFFT_CUDA_FLAGS}) +target_compile_options(cufinufft PRIVATE ${FINUFFT_CUDA_FLAGS}) if(WIN32) target_link_libraries(cufinufft PUBLIC CUDA::cudart CUDA::cufft CUDA::nvToolsExt) diff --git a/test/cuda/CMakeLists.txt b/test/cuda/CMakeLists.txt index 212fd6674..d40e8e66b 100644 --- a/test/cuda/CMakeLists.txt +++ b/test/cuda/CMakeLists.txt @@ -5,14 +5,16 @@ foreach(srcfile ${test_src}) get_filename_component(executable ${executable} NAME) add_executable(${executable} ${srcfile}) target_include_directories(${executable} PUBLIC ${CUFINUFFT_INCLUDE_DIRS}) + target_compile_options(${executable} + PUBLIC $<$:--extended-lambda>) find_library(MathLib m) if(MathLib) target_link_libraries(${executable} PUBLIC cufinufft ${MathLib}) endif() target_compile_features(${executable} PUBLIC cxx_std_17) set_target_properties( - ${executable} PROPERTIES LINKER_LANGUAGE CUDA CUDA_ARCHITECTURES - "${FINUFFT_CUDA_ARCHITECTURES}") + ${executable} PROPERTIES LINKER_LANGUAGE CUDA + CUDA_ARCHITECTURES "${FINUFFT_CUDA_ARCHITECTURES}") message(STATUS "Adding test ${executable}" " with CUDA_ARCHITECTURES=${FINUFFT_CUDA_ARCHITECTURES}" " and INCLUDE=${CUFINUFFT_INCLUDE_DIRS}")