[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:31:03 PST 2024


================
@@ -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)
----------------
aganea wrote:

Using `append_if(TRUE ...)` because on MSVC silencing unknown warnings is a silent action.

https://github.com/llvm/llvm-project/pull/80174


More information about the Openmp-commits mailing list