From 39d54598f8ba183c7f6f0b33de98a7fd0a5732c9 Mon Sep 17 00:00:00 2001 From: Mahesh Maddineni Date: Thu, 19 Sep 2024 12:32:19 -0700 Subject: [PATCH] Added --openmp:llvm flag to utilize latest version for min/max reductions --- cmake/modules/CheckDependentLibraries.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/modules/CheckDependentLibraries.cmake b/cmake/modules/CheckDependentLibraries.cmake index 4c2d33f124a..7123c0dfcf0 100644 --- a/cmake/modules/CheckDependentLibraries.cmake +++ b/cmake/modules/CheckDependentLibraries.cmake @@ -269,6 +269,10 @@ endif() if(WITH_OPENMP) find_package(OpenMP REQUIRED) + if(MSVC AND OPENMP_FOUND) + # for min/max reduction + add_compile_options(-openmp:llvm) + endif() endif() # Data format options