From 5cfc8d0919cf4acdbf4d55fd381bd7ed236f31c4 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Sun, 21 Jan 2024 14:21:26 +0100 Subject: [PATCH] Enable newer lambda processor for MSVC The legacy lambda processor has problems parsing some lambda functions in LLAMA, like polymorphic lambdas with attributes, e.g. used in constructField. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a3de3831a..8f86a4d8a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ endif() if (MSVC) # FIXME(bgruber): alpaka uses M_PI, so we need to make it available on MSVC. This may be fixed in alpaka 1.0.0. target_compile_definitions(llama INTERFACE _USE_MATH_DEFINES) + target_compile_options(${PROJECT_NAME} INTERFACE /Zc:lambda) # needed in C++17 mode, remove when upgrading to C++20 endif() # CUDA