[Openmp-commits] [openmp] [openmp] On Windows, fix standalone cmake build (PR #80174)
Alexandre Ganea via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 31 10:28:34 PST 2024
https://github.com/aganea created https://github.com/llvm/llvm-project/pull/80174
This fixes: https://github.com/llvm/llvm-project/issues/80117
>From 5d67ce4a790818d2316787209160d9528db795f9 Mon Sep 17 00:00:00 2001
From: Alexandre Ganea <alex_toresh at yahoo.fr>
Date: Wed, 31 Jan 2024 13:22:19 -0500
Subject: [PATCH] [openmp] On Windows, fix standalone cmake build
This fixes: https://github.com/llvm/llvm-project/issues/80117
---
openmp/cmake/HandleOpenMPOptions.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/openmp/cmake/HandleOpenMPOptions.cmake b/openmp/cmake/HandleOpenMPOptions.cmake
index 201aeabbd3df9..79dfa334d749e 100644
--- a/openmp/cmake/HandleOpenMPOptions.cmake
+++ b/openmp/cmake/HandleOpenMPOptions.cmake
@@ -44,9 +44,9 @@ append_if(OPENMP_HAVE_DATA_SECTIONS "-fdata-sections" CMAKE_C_FLAGS CMAKE_CXX_FL
if (MSVC)
# Disable "warning C4201: nonstandard extension used: nameless struct/union"
- append("-wd4201" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append_if(TRUE "-wd4201" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
# Disable "warning C4190: '__kmpc_atomic_cmplx8_rd' has C-linkage specified, but returns
# UDT '__kmp_cmplx64_t' which is incompatible with C"
- append("-wd4190" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append_if(TRUE "-wd4190" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
More information about the Openmp-commits
mailing list