Skip to content

Commit

Permalink
Require C++20 for alpaka-nbody with MSVC
Browse files Browse the repository at this point in the history
This is a workaround for an MSVC failure when constexpr-evaluating the tag
stringification during mapping visualization dumping.
  • Loading branch information
bernhardmgruber committed Jan 16, 2024
1 parent 6338563 commit fbb93ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/alpaka/nbody/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE llama::llama fmt::fmt alpaka::alpa

if (MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /arch:AVX2) # /fp:fast
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # MSVC fails some constexpr evaluation in C++17
else()
target_compile_options(${PROJECT_NAME} PRIVATE -march=native -fno-math-errno) # -ffast-math
endif()

0 comments on commit fbb93ba

Please sign in to comment.